Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't get anything to transcribe. #3

Open
JustTryAI opened this issue Nov 5, 2023 · 0 comments
Open

Can't get anything to transcribe. #3

JustTryAI opened this issue Nov 5, 2023 · 0 comments

Comments

@JustTryAI
Copy link

The transcribing parameters don't appear to do anything when passed in, the recording works great but I'm not able to get anything back from the partialText.

[RelayCommand]
private async Task HandleRecordAsync()
{
    var status = await Permissions.RequestAsync<Permissions.Microphone>();
    if (status == PermissionStatus.Granted)
    {
        try
        {
            var documentsPath = FileSystem.AppDataDirectory;
            var filePath = Path.Combine("/storage/emulated/0/Download", "testfile.wav");

            _audioRecorderService.FilePath = filePath;

            await _audioRecorderService.StartRecordingAsync(
                CultureInfo.GetCultureInfo("en-us"),
                new Progress<string>(partialText =>
                {
                    transcribedText += partialText + " ";
                }),
                CancellationToken.None);

            IsRecording = true;
        }
        catch (Exception ex)
        {
            IsRecording = false;

        }
    }
    else
    {
        IsRecording = false;
    }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant