speech-to-text restful api return “Empty reply from server”

zpzhuang 11 Reputation points
2022-01-13T07:01:52.797+00:00

Currently I am using speech-to-text restful api ,the ogg container format is written by myself ,this ogg file can be played directly ,but i don't know why the microsoft engine return “Empty reply from server”

curl --location --request POST 'https://japaneast.stt.speech.microsoft.com/speech/recognition/conversation/cognitiveservices/v1?language=en-US' \  
--header 'Ocp-Apim-Subscription-Key: xxxxx' \  
--header 'Content-Type: audio/ogg; codecs=opus' \  
--data-binary @'zh_sts.ogg'   

you can download the file from the following link :
https://drive.google.com/file/d/18bn2_lxe6VO0AP7t0Bcbp4z3uuKAriob/view?usp=sharing
https://drive.google.com/file/d/1LMZh1_3PAEm8vNYkHcB6jxUge1M1wXlz/view?usp=sharing

I can use MediaInfo tools to view my ogg file information

164543-image.png

Azure AI Speech
Azure AI Speech
An Azure service that integrates speech processing into apps and services.
2,061 questions
{count} vote

1 answer

Sort by: Most helpful
  1. zpzhuang 11 Reputation points
    2022-01-14T12:37:13.437+00:00

    165085-identification.png

    I have found the reason
    .
    According to rfc7845,
    In ogg container , All fields in the ID headers are REQUIRED, except for 'channel
    mapping table', which MUST be omitted when the channel mapping family
    is 0, but is REQUIRED otherwise.

    In my oggfile, erros due to automatic memory alignment, when Mapping Family equal 0 , still have Channel Mapping Table Filed.

    PS:The same file, I can get the translation result through google engine.

    165143-%E4%BC%81%E4%B8%9A%E5%BE%AE%E4%BF%A1%E6%88%AA%E5%9B%BE-20220114202118.png

    1 person found this answer helpful.
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.