In my scenario, when does the cost occur in Cognitive Speech Services?

DevKya 0 Reputation points
2023-08-08T01:47:03.5833333+00:00

Hello everyone,

I am using MS Azure Cognitive service - Speech To Text.

I have written a WebSocket using the Python library azure-cognitive services-speech and Django Channels to transmit real-time audio data. I am curious when the cost is incurred. Here is a scenario:

1.When the WebSocket is connected, I use to connect to MS.

speech_recognizer.start_continuous_recognition_async()

2.Audio Byte data continues to be transmitted(Byte data is transmitted even if voice is not present), and I use the callback functions

speech_recognizer.recognizing.connect(self.callback_recognizing)

speech_recognizer.recognized.connect(self.callback_recognized)

to receive the transcribed text when the audio is meaningful.

  1. When the WebSocket connection is cut off, I disconnect from MS using this code.
self.speech_recognizer.stop_continuous_recognition_async()

When is the cost incurred in this scenario?

Is it for the entire time connected to MS, or is it for the length (time) of the meaningful text data received?

I couldn't find the answer to this.

I would appreciate your help.

Azure AI Speech
Azure AI Speech
An Azure service that integrates speech processing into apps and services.
2,079 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,673 questions
{count} votes

1 answer

Sort by: Most helpful
  1. romungi-MSFT 48,916 Reputation points Microsoft Employee Moderator
    2023-08-08T11:17:35.21+00:00

    @DevKya The billing is done based on audio hours for speech to text and it starts as soon as the service receives audio after you call start_continuous_recognition_async() or the corresponding REST API. I understand a voice or meaningful audio might start later in the stream or audio file but from the service perspective the start and end of audio or audio file duration is used to calculate billing. In the above case, the audio passed between start_continuous_recognition_async() and stop_continuous_recognition_async(). I hope this helps!!

    If this answers your query, do click Accept Answer and Yes for was this answer helpful. And, if you have any further query do let us know.

    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.