AudioConfig Class

Represents specific audio configuration, such as microphone, file, or custom audio streams

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: typing.Union[str, NoneType] = None, stream: typing.Union[azure.cognitiveservices.speech.audio.AudioInputStream, NoneType] = None, device_name: typing.Union[str, NoneType] = 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.