I have a question about STT api.

matt 0 Reputation points
2024-03-18T00:55:26.8433333+00:00

"Is there an event API in the STT (Speech-to-Text) API that measures the volume of the microphone input? For example, Google API has the following event listener."

recognizer.setRecognitionListener(object : RecognitionListener {

override fun onRmsChanged(rmsdB: Float) {
// 목소리 크기
}

Azure AI Speech
Azure AI Speech
An Azure service that integrates speech processing into apps and services.
1,555 questions
{count} votes

1 answer

Sort by: Most helpful
  1. navba-MSFT 20,810 Reputation points Microsoft Employee
    2024-03-18T05:47:56.75+00:00

    @matt Welcome to Microsoft Q&A Forum, Thank you for posting your query here!

    Firstly, Could you please share your use case here and your requirement on what you are trying to accomplish ? This will help us to assist you better.

    Please note that the Azure AI Speech Service does not provide a direct API to measure the volume of the microphone input like the onRmsChanged event in Google’s API. However, you can create your own audio input stream class derived from PullAudioInputStreamCallback.

    This allows you to stream audio into the recognizer as an alternative to microphone or file input.

    More info here.

    You can then create an audio configuration based on your audio format and custom audio input stream. Although this doesn’t directly provide a volume measurement, you could potentially analyze the audio data within the Read method to calculate the volume.

    Hope this helps. If you have any follow-up questions, please let me know.

    0 comments No comments