Realtime Recognizer not utilising with Semantic Segmentation

Thomas Bauer 20 Reputation points
2024-11-08T02:34:01.7166667+00:00

Hi all!

I'm using the Azure speechsdk.SpeechRecognizer for transcribing streamed real-time audio. While the transcription works, continuous talking will result in large paragraphs being outputted rather than sentence by sentence. I included the speech_config.set_property(speechsdk.PropertyId.Speech_SegmentationStrategy, "Semantic") in order to utilise the semantic separation rather than audio based separation. However the output is 100% identical. For example it took this long for the recognizer to output:
a classic example of early remote control the idea was simple club and your lights will turn on off you didn't need to physically handle a wire remote we didn't have to find a clicker to point at a TV and you could make automations happen at a very limited scale i remember that i'd clap along to a song and the lights would go wild

The output:

A classic example of early remote control. The idea was simple, club and your lights will turn on off. You didn't need to physically handle a wire remote, we didn't have to find a clicker to point at a TV, and you could make automations happen at a very limited scale. I remember that I'd clap along to a song and the lights would go wild.
The output is correct and I can see that the recognizer is collecting word by word but it took this whole paragraph until it was returned formatted. The behavior is exactly as if the semantic recognition is not used.

This is how I set up the recognizer, is there some step missing?

speech_config = speechsdk.SpeechConfig(subscription=os.getenv('AZURE_SPEECH_KEY'), region=os.getenv('AZURE_SPEECH_REGION'))
            speech_config.set_property(speechsdk.PropertyId.Speech_SegmentationStrategy, "Semantic")
            speech_config.speech_recognition_language="en-US"
            speech_config.set_property(speechsdk.PropertyId.Spee)
            self.push_stream = speechsdk.audio.PushAudioInputStream()
            audio_config = speechsdk.audio.AudioConfig(stream=self.push_stream)
            self.speech_recognizer = speechsdk.SpeechRecognizer(speech_config=speech_config, audio_config=audio_config)

Azure Speech in Foundry Tools
0 comments No comments

2 answers

Sort by: Newest
  1. Thomas Bauer 20 Reputation points
    2025-01-27T18:00:11.08+00:00

    The Update to SDK version 1.42.0 from Jan 2025 solved this issue. Semantic separation now works as expected

    Was this answer helpful?

    0 comments No comments

  2. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.

    3 deleted comments

    Comments have been turned off. Learn more

Your answer

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