-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Predictions Speech to text doesn't work in fr-FR, en-AU, en-GB and fr-CA #7808
Comments
Hi @SebSchwartz, thanks for your research! You are right, and we should downsample the buffer to 8khz depending on the language code. We already have code for downsampling that should make this fix easier: amplify-js/packages/predictions/src/Providers/AmazonAIConvertPredictionsProvider.ts Line 332 in ac0ef4b
and we were hard setting the target downsample samplerate to 8khz here amplify-js/packages/predictions/src/Providers/AmazonAIConvertPredictionsProvider.ts Line 330 in ac0ef4b
We would just need to set that to 8khz if the target code is one of the four you mentioned (maybe add that as a parameter to amplify-js/packages/predictions/src/Providers/AmazonAIConvertPredictionsProvider.ts Line 402 in ac0ef4b
to 8khz or 16khz. Do you think you can work on creating a PR for this? |
Thanks a lot @SebSchwartz ! I'll take a look :) |
From the above pull request being merged, I am going to close this issue. |
This issue has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs. Looking for a help forum? We recommend joining the Amplify Community Discord server |
Describe the bug
The speech to text cannot work in fr-FR, en-AU, en-GB and fr-CA as the sample rate for the streaming transcription is limited to 8 kHz and amplify always send 16 kHz in the request.
As explained in the doc -> https://docs.aws.amazon.com/transcribe/latest/dg/streaming.html
To Reproduce
amplify-js/packages/predictions/src/Providers/AmazonAIConvertPredictionsProvider.ts
Lines 397 to 402 in ac0ef4b
Expected behavior
Amplify should detect the sample rate or allow user to pass it as param (more easy to do).
Code Snippet
The text was updated successfully, but these errors were encountered: