Module cognitive_services_speech_sdk_rs::audio
source · [−]Expand description
Package audio provides the audio configuration, input/output streams, and related utilities for audio interactions.
Structs
AudioConfig represents specific audio configuration, such as microphone, file, or custom audio streams.
AudioStreamFormat represents the audio stream format used for custom audio input configurations.
PullAudioInputStream represents audio input stream with audio data pulled (read) by Speech Recognizer when needed via read method. Passing audio input is controlled by receiver.
PullAudioOutputStream represents audio output stream with audio data pulled (read) by service calling Speech Synthetizer via read method. Speech Synthetizer’s caller is activelly pulling (reading) already synthetized audio data.
PushAudioInputStream represents audio input stream with audio data pushed by audio producer write method. Passing audio input is controlled by audio producer.
PushAudioOutputStream represents audio output stream with audio data pushed by Speech Synthetizer via write method. Speech Synthetizer’s caller is passivelly receiving already synthetized audio data via registered write callback.
Enums
AudioStreamContainerFormat defines supported audio stream container format.
Traits
Abstraction over audio input push & pull streams. Enables transparent handling of both pull & push input audio streams by respective functions.
Abstraction over audio output push & pull streams. Enables transparent handling of both pull & push output audio streams by respective functions.
This trait that must be implemented by callback struct
passed into pull audio input stream during initialization.
Methods of this trait will be called by Speech Recognizer.
When Speech recognizer is ready to process more data it
will call read method.
Structs implementing
PullAudioInputStreamCallbacks must also implement Send trait.
To see how to use see example: recognizer/continuous_recognition_pull_stream.
This trait that must be implemented by callback struct
passed into push audio output stream during initialization.
Methods of this trait will be called by Speech Synthetizer.
When Synthetizer has syntehtized data it
will call write method.
Structs implementing
PushAudioOutputStreamCallbacks must also implement Send trait.
To see how to use see example: synthesizer/speak_ssml_async.