I m tryting to use the Batch transcription of Microsoft Azure. following the Official documentation I guess should be like this:
- I send the Audio to the service (POST)
- Get results. (GET with parameters of the post)
but I m not getting anything.
1)
url_endpoint = "https://westeurope.api.cognitive.microsoft.com/speechtotext/v3.0/transcriptions/"
payload = json.dumps({
"contentUrls": <url of my oudio.mp3>,
"properties": {
"wordLevelTimestampsEnabled": True
},
"locale": "en-US",
"displayName": "Testing if works"
})
headers = {
'Ocp-Apim-Subscription-Key': my_subscription_key,
'Content-Type': 'application/json'
}
response = requests.request("POST", url_endpoint, headers=headers, data=payload)
With the results of the post I build my GET methode.
response2 = requests.request("GET", json.loads(response.text)["links"]["files"], headers=headers, data={})
when I check the results of response2, there is a "contentURL" where I imagine could be the results
r
esponse2.json()
{'values': [{'self': 'https://westeurope.api.cognitive.microsoft.com/speechtotext/v3.0/transcriptions/<id_of_my_transcription>',
'name': 'report.json',
'kind': 'TranscriptionReport',
'properties': {'size': 399},
'createdDateTime': '2022-09-01T09:51:10Z',
'links': {'contentUrl': 'https://spsvcprodweu.blob.core.windows.net/<values>'}}]}
Checking the "contentUrl" manually (copy paste in my browser) I get the error "errorMessage": "Error when downloading the recording URI. StatusCode: Conflict."
I dont know what I m doing wrong, how can I get the results(the transcription) ?