-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
using pronunciation assessment - rest api problem #680
Comments
@sathayen does your wave file have a riff header? The riff header is required by REST API. |
@yinhew attached please find the wave file. The transcription is "zero". I have independently run the STT service with a different endpoint (without the pronunciation assessment) and it works as expected. This file is from this opensource repo. You can also try any other files in this repo. I have only resampled the wav file to make the sample rate as 16000 (using python's Can you please share any sample wave file which actually works? (including the reference text) . Also, is the code in my initial comment look OK to you? |
@sathayen I tried below (without pronunciation-assessment) and got the same error: curl -X POST "https://centralindia.stt.speech.microsoft.com/speech/recognition/conversation/cognitiveservices/v1?language=en-US" -H "accept: application/json" -H "Ocp-Apim-Subscription-Key: MY_SUBSCRIPTION_KEY" -H "Content-Type: audio/wav; codecs=audio/pcm; samplerate=16000" -d "{ "recordingsUrl": "https://MYBLOBSTORAGE.blob.core.windows.net/MYCONTAINER/MY_AUDIO.wav\", "locale": "en-US", "name": "Transcription using locale en-US"}" The problem is on the "-d" parameter. It should be the audio binary instead of a json text. |
hi, @yinhew , thanks for a quick response. I tried replacing -d parameter with the --data-binary exactly as you suggested . I executed the curl command from the directory where I have the wav file. But now it is returning a message Am I missing anything here? The following is my full command (only removed the token), executed from the path where I have this audio file:
|
@yinhew, please disregard my last comment. This appears to be a firewall/proxy issue. I was able to successfully execute this from another server. Related questions-
Thanks! |
@sathayen we have python sample code here: For remote blob, I don't think our API support that, neither STT API. |
@yinhew , thanks for the Python sample. I have actually developed something similar, but this is useful!
FYI The STT batch transcription API supports transcription for a remote blob. I just need to provide the followng (and of course there are some other post processing steps after you get the response to your post request). I have successfully used this to get the transcription. `data = { "recordingsUrl": REMOTE_BLOB_URL
|
@sathayen : Did you manage to get the pronunciation assessment done by passing the remote blob URL? I tried but it didn't work for me. :(. |
Hello team -- this related to issue 618
I am trying to use the pronunciation assessment rest api and getting an
unsupported audio format
error, despite the audio being a wav file with a sample rate of 16000. Here is my curl command ( added new lines for easier reading)curl -X POST "https://centralindia.stt.speech.microsoft.com/speech/recognition/conversation/cognitiveservices/v1?language=en-US"
-H "accept: application/json"
-H "Ocp-Apim-Subscription-Key: MY_SUBSCRIPTION_KEY"
-H "Content-Type: audio/wav; codecs=audio/pcm; samplerate=16000"
-H "Pronunciation-Assessment: eyJSZWZlcmVuY2VUZXh0IjoiemVybyIsIkdyYWRpbmdTeXN0ZW0iOiJIdW5kcmVkTWFyayIsIkdyYW51bGFyaXR5IjoiRnVsbFRleHQiLCJEaW1lbnNpb24iOiJDb21wcmVoZW5zaXZlIn0="
-d "{ \"recordingsUrl\": \"https://MYBLOBSTORAGE.blob.core.windows.net/MYCONTAINER/MY_AUDIO.wav\", \"locale\": \"en-US\", \"name\": \"Transcription using locale en-US\"}"
{"ReferenceText": "zero","GradingSystem": "HundredMark","Granularity":"FullText","Dimension": "Comprehensive"}
. I converted this json directly to base64 using this tool#618
@ram-msft -- see also this issue
The text was updated successfully, but these errors were encountered: