AudioConfig Class

Represents audio input or output configuration. Audio input can be from a microphone, file, or input stream. Audio output can be to a speaker, audio file output in WAV format, or output stream.

Generates an audio configuration for the various recognizers. Only one argument can be passed at a time.

Inheritance
builtins.object
AudioConfig

Constructor

AudioConfig(use_default_microphone: bool = False, filename: Optional[str] = None, stream: Optional[azure.cognitiveservices.speech.audio.AudioInputStream] = None, device_name: Optional[str] = None)

Parameters

use_default_microphone
Required

Specifies to use the default system microphone for audio input.

device_name
Required

Specifies the id of the audio device to use. Please refer to this page on how to retrieve platform-specific microphone names. This functionality was added in version 1.3.0.

filename
Required

Specifies an audio input file.

stream
Required

Creates an AudioConfig object representing the specified stream.