Azure Speech To Text control the length of recognized, or setting a threshhold that will return a recognized result after silence threshhold

榮豪 蔡 6 Reputation points
2022-12-30T10:10:18.273+00:00

Hello Engineer,

I am using the Azure Speech To Text (Javascript) for creating subtitles,

After try lots of property in speechConfig, I could not find a property that could help me as

If a person is talking a article or long story, the speechRecognizer.recognized callback could immediately return after person finish its sentense.

right now the Speech To Text will return when person finish his story.

I am wondering if there is any approach or api I could resolve this problem?

Azure AI Speech
Azure AI Speech
An Azure service that integrates speech processing into apps and services.
2,072 questions
Azure AI services
Azure AI services
A group of Azure services, SDKs, and APIs designed to make apps more intelligent, engaging, and discoverable.
3,642 questions
{count} votes

1 answer

Sort by: Most helpful
  1. romungi-MSFT 48,911 Reputation points Microsoft Employee Moderator
    2022-12-30T17:22:49.857+00:00

    @榮豪 蔡 If you want to stop recognition before the end of the conversation you should call stopContinuousRecognitionAsync() but it would not capture the entire conversation.
    If you would like to capture only one sentence at a time you should use recognizeOnceAsync() to capture sentences only till the silence after completing the sentence.
    In this example the file is written during the recognizing and recognized events so based on audio, stop recognition is only called after the end of session or if the end of stream is reached.

    If an answer is helpful, please click on 130616-image.png or upvote 130671-image.png which might help other community members reading this thread.

    1 person found this answer helpful.

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.