Hello, everybody,
I have an HTTP request using MS Flow to transcribe a text in language. This was executed and the status code of the request is 200, so the request call is ok. As a result I get a Json response which contains a WAV file. The content of content can be saved as a file. When playing the file I get the hint that the file format is not correct.
https://docs.microsoft.com/de-de/azure/cognitive-services/speech-service/rest-text-to-speech
Http request is:
{ "inputs": { "method": "POST", "uri": "https://northeurope.tts.speech.microsoft.com/cognitiveservices/v1", "headers": { "Authorization": "Bearer @{body('HTTPToken')}", "X-Microsoft-OutputFormat": "@variables('OutputFormat')", "Content-type": "application/ssml+xml", "Content-Length": "@{length(variables('Text'))}" }, "body": "@xml(variables('VAR_JSON'))" } }
the answer is this:
{"statusCode":200,"headers":{"Transfer-Encoding":"chunked","X-MSEdge-Ref":"Ref A: FE3DE96789B14B8688AF716A71DA479A Ref B: AM3EDGE0514 Ref C: 2019-10-23T10:53:08Z","Date":"Wed, 23 Oct 2019 10:53:08 GMT","Content-Type":"audio/x-wav","Content-Length":"361714"},"body":{"$content-type":"audio/x-wav","$content":"UklGRuqEBQBXQVZFZm10IBAAAAABAAEAQB8AAIA+AAACABAAZGF0YcaEBQAAAAAAAAAAAAAAAAAAAAAAAA .... here come many chars... AAAAAAAAAAA=="}}
I don't know which formatting to use to save the content as a playable file.
I hope for an informative answer.
Many thanks in advance.
Solved! Go to Solution.
Hey @UIT
You can try saving the file with a .mp3 extension. If it is being created on SharePoint, it can be played over there.
Hope this Helps!
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
I saved the outout one time with and one time without header in a mp3 file, but bott are not playable.
Hey @UIT
Can you share a screenshot of the flow? what action are you using to save the file? You just have to add the .mp3 to the filename with extension part. If you can share a screenshot of the flow, we can better understand the issue and help you with this.
Hope this Helps!
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
User | Count |
---|---|
27 | |
16 | |
13 | |
8 | |
5 |
User | Count |
---|---|
9 | |
5 | |
3 | |
3 | |
2 |