AudioConfig class

Definition

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.

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)
Inheritance
builtins.object
AudioConfig

Parameters

use_default_microphone

Specifies to use the default system microphone for audio input.

device_name

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

Specifies an audio input file.

stream

Creates an AudioConfig object representing the specified stream.