question

MuhsinWahiAnwar-1661 avatar image
0 Votes"
MuhsinWahiAnwar-1661 asked YutongTie-MSFT commented

[Speech to text] How do I configure the AudioConfig object to an AudioBuffer Object?

Hello,

I'm trying to get some audio inputs working and want to use an mozilla/HTML AudioBuffer object as an input for some speech identification.

What kind of AudioConfig object should I use? Currently I'm going with sdk.AudioConfig.fromWavFileInput(AudioBuffer);
Is this good?

azure-speech
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

YutongTie-MSFT avatar image
0 Votes"
YutongTie-MSFT answered
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

MuhsinWahiAnwar-1661 avatar image
0 Votes"
MuhsinWahiAnwar-1661 answered YutongTie-MSFT commented

Awesome. When I input an audio stream into into the audio config and use the recognizer, will the recognizer be able to 'listen' to the audio instantaneously? Or does it send the audio data in real time?

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hello,

According to the code, it has "read" and "close" sessions and it will return the data to caller.

 public class ContosoAudioStream : PullAudioInputStreamCallback {
     ContosoConfig config;
    
     public ContosoAudioStream(const ContosoConfig& config) {
         this.config = config;
     }
    
     public int Read(byte[] buffer, uint size) {
         // returns audio data to the caller.
         // e.g. return read(config.YYY, buffer, size);
     }
    
     public void Close() {
         // close and cleanup resources.
     }
 };

Regards,
Yutong

0 Votes 0 ·