### Azure SDK Reference Documentation Source: https://learn.microsoft.com/en-us/python/api/?view=azure-python/azure-cognitiveservices-speech/azure.cognitiveservices Links to the comprehensive reference documentation for the Azure SDK for Python. This includes details on all available libraries, modules, classes, and methods for interacting with Azure services. ```APIDOC Azure SDK for Python Overview: URL: https://learn.microsoft.com/en-us/python/api/overview/azure/?view=azure-python Cognitive Services Speech Module: URL: https://learn.microsoft.com/en-us/python/api/azure-cognitiveservices-speech/azure.cognitiveservices.speech?view=azure-python Description: Documentation for the Speech SDK, enabling speech-to-text and text-to-speech capabilities. Python Developer Resources: URL: https://learn.microsoft.com/en-us/azure/developer/python/ Description: General resources for Python developers working with Azure, including getting started guides and best practices. Azure Monitor Logs for Python: URL: https://learn.microsoft.com/en-us/azure/azure-monitor/app/opencensus-python?view=azure-python Description: Information on integrating Azure Monitor logs with Python applications using OpenCensus. Azure SDK PyPI Package Index: URL: https://learn.microsoft.com/en-us/azure/developer/python/sdk/azure-sdk-library-package-index?view=azure-python Description: A list of all available Azure SDK libraries published on PyPI for Python. ``` -------------------------------- ### Azure Speech SDK - Output Format and Phrase List Grammar Source: https://learn.microsoft.com/en-us/python/api/?view=azure-python/azure-cognitiveservices-speech/azure.cognitiveservices Defines output formats and provides functionality for phrase list grammars in the Azure Cognitive Services Speech SDK. ```APIDOC OutputFormat: https://learn.microsoft.com/en-us/python/api/azure-cognitiveservices-speech/azure.cognitiveservices.speech.outputformat?view=azure-python PhraseListGrammar: https://learn.microsoft.com/en-us/python/api/azure-cognitiveservices-speech/azure.cognitiveservices.speech.phraselistgrammar?view=azure-python ``` -------------------------------- ### Azure Speech SDK - SpeechConfig Source: https://learn.microsoft.com/en-us/python/api/?view=azure-python/azure-cognitiveservices-speech/azure.cognitiveservices The SpeechConfig class defines configurations for speech recognition, intent recognition, and speech synthesis. It supports multiple initialization methods: from a subscription key and region, from an endpoint (with optional subscription key or authorization token), or from a host address (with optional subscription key or authorization token). ```APIDOC SpeechConfig: Class that defines configurations for speech / intent recognition and speech synthesis. Initialization: * from subscription: pass a subscription key and a region * from endpoint: pass an endpoint. Subscription key or authorization token are optional. * from host: pass a host address. Subscription key or authorization token are optional. ``` -------------------------------- ### Azure Speech SDK API Reference Source: https://learn.microsoft.com/en-us/python/api/?view=azure-python/azure-cognitiveservices-speech/azure.cognitiveservices Provides an overview of the Azure Speech SDK for Python, including its packages, modules, classes, and enumerations. This is a reference for developers using the SDK. ```APIDOC Namespace: azure.cognitiveservices.speech Overview: This namespace contains classes and functions for interacting with Azure Cognitive Services Speech. It allows developers to perform speech-to-text, text-to-speech, and speech translation. Contents: - Packages: Lists the available packages within the namespace. - Modules: Details the modules available for specific functionalities. - Classes: Describes the core classes used for speech processing (e.g., SpeechRecognizer, AudioConfig). - Enums: Explains the enumerations used for configuration and status reporting. Example Usage: ```python # Example of initializing a speech recognizer (conceptual) from azure.cognitiveservices.speech import SpeechConfig, SpeechRecognizer, AudioConfig speech_config = SpeechConfig(subscription='YOUR_SPEECH_KEY', region='YOUR_SPEECH_REGION') audio_config = AudioConfig(use_default_microphone=True) speech_recognizer = SpeechRecognizer(speech_config=speech_config, audio_config=audio_config) # Start recognition (conceptual) # result = speech_recognizer.recognize_once_async().get() ``` Related Concepts: - Speech-to-Text - Text-to-Speech - Speech Translation - Azure Cognitive Services ``` -------------------------------- ### Azure Speech SDK - Properties and Version Source: https://learn.microsoft.com/en-us/python/api/?view=azure-python/azure-cognitiveservices-speech/azure.cognitiveservices Provides access to properties and version information for the Azure Cognitive Services Speech SDK. ```APIDOC properties: https://learn.microsoft.com/en-us/python/api/azure-cognitiveservices-speech/azure.cognitiveservices.speech.properties?view=azure-python version: https://learn.microsoft.com/en-us/python/api/azure-cognitiveservices-speech/azure.cognitiveservices.speech.version?view=azure-python ``` -------------------------------- ### Azure Speech SDK - Events and Keyword Recognition Source: https://learn.microsoft.com/en-us/python/api/?view=azure-python/azure-cognitiveservices-speech/azure.cognitiveservices Classes for handling events, connection arguments, and keyword recognition functionalities within the Azure Cognitive Services Speech SDK. ```APIDOC ConnectionEventArgs: https://learn.microsoft.com/en-us/python/api/azure-cognitiveservices-speech/azure.cognitiveservices.speech.connectioneventargs?view=azure-python EventSignal: https://learn.microsoft.com/en-us/python/api/azure-cognitiveservices-speech/azure.cognitiveservices.speech.eventsignal?view=azure-python KeywordRecognitionEventArgs: https://learn.microsoft.com/en-us/python/api/azure-cognitiveservices-speech/azure.cognitiveservices.speech.keywordrecognitioneventargs?view=azure-python KeywordRecognitionModel: https://learn.microsoft.com/en-us/python/api/azure-cognitiveservices-speech/azure.cognitiveservices.speech.keywordrecognitionmodel?view=azure-python KeywordRecognitionResult: https://learn.microsoft.com/en-us/python/api/azure-cognitiveservices-speech/azure.cognitiveservices.speech.keywordrecognitionresult?view=azure-python KeywordRecognizer: https://learn.microsoft.com/en-us/python/api/azure-cognitiveservices-speech/azure.cognitiveservices.speech.keywordrecognizer?view=azure-python ``` -------------------------------- ### Azure Speech SDK - Audio Handling Source: https://learn.microsoft.com/en-us/python/api/?view=azure-python/azure-cognitiveservices-speech/azure.cognitiveservices Classes for handling audio data streams, container formats, and wave formats within the Azure Cognitive Services Speech SDK. ```APIDOC AudioDataStream: https://learn.microsoft.com/en-us/python/api/azure-cognitiveservices-speech/azure.cognitiveservices.speech.audiodatastream?view=azure-python AudioStreamContainerFormat: https://learn.microsoft.com/en-us/python/api/azure-cognitiveservices-speech/azure.cognitiveservices.speech.audiostreamcontainerformat?view=azure-python AudioStreamWaveFormat: https://learn.microsoft.com/en-us/python/api/azure-cognitiveservices-speech/azure.cognitiveservices.speech.audiostreamwaveformat?view=azure-python ``` -------------------------------- ### Azure Cognitive Services Speech SDK for Python Modules Source: https://learn.microsoft.com/en-us/python/api/?view=azure-python/azure-cognitiveservices-speech/azure.cognitiveservices This section lists the modules available in the Azure Cognitive Services Speech SDK for Python. Each module is associated with a URL for detailed API documentation and a brief description of its purpose. ```APIDOC audio: Description: Classes concerned with the handling of audio input to the various recognizers, and audio output from the speech synthesizer. URL: https://learn.microsoft.com/en-us/python/api/azure-cognitiveservices-speech/azure.cognitiveservices.speech.audio?view=azure-python dialog: Description: Classes related to dialog service connector. URL: https://learn.microsoft.com/en-us/python/api/azure-cognitiveservices-speech/azure.cognitiveservices.speech.dialog?view=azure-python enums: Description: Enum classes for the Speech SDK. URL: https://learn.microsoft.com/en-us/python/api/azure-cognitiveservices-speech/azure.cognitiveservices.speech.enums?view=azure-python intent: Description: Classes related to intent recognition from speech. URL: https://learn.microsoft.com/en-us/python/api/azure-cognitiveservices-speech/azure.cognitiveservices.speech.intent?view=azure-python interop: Description: Interoperability classes for the Speech SDK. URL: https://learn.microsoft.com/en-us/python/api/azure-cognitiveservices-speech/azure.cognitiveservices.speech.interop?view=azure-python languageconfig: Description: Classes concerned with the handling of language configurations. URL: https://learn.microsoft.com/en-us/python/api/azure-cognitiveservices-speech/azure.cognitiveservices.speech.languageconfig?view=azure-python properties: Description: Property classes for the Speech SDK. URL: https://learn.microsoft.com/en-us/python/api/azure-cognitiveservices-speech/azure.cognitiveservices.speech.properties?view=azure-python speech: Description: Classes related to recognizing text from speech, synthesizing speech from text, and general classes used in the various recognizers. URL: https://learn.microsoft.com/en-us/python/api/azure-cognitiveservices-speech/azure.cognitiveservices.speech.speech?view=azure-python transcription: Description: Classes related to conversation transcription. URL: https://learn.microsoft.com/en-us/python/api/azure-cognitiveservices-speech/azure.cognitiveservices.speech.transcription?view=azure-python translation: Description: Classes related to translation of speech to other languages. URL: https://learn.microsoft.com/en-us/python/api/azure-cognitiveservices-speech/azure.cognitiveservices.speech.translation?view=azure-python version: Description: Version information for the Speech SDK. URL: https://learn.microsoft.com/en-us/python/api/azure-cognitiveservices-speech/azure.cognitiveservices.speech.version?view=azure-python ``` -------------------------------- ### Speech Synthesis Classes Source: https://learn.microsoft.com/en-us/python/api/?view=azure-python/azure-cognitiveservices-speech/azure.cognitiveservices Documentation for classes related to speech synthesis events, results, and viseme information. These are used for managing the speech synthesis process and its outputs. ```APIDOC SpeechSynthesisBookmarkEventArgs: Description: Class for speech synthesis bookmark event arguments. Added in version 1.16.0. Constructor for internal use. Link: https://learn.microsoft.com/en-us/python/api/azure-cognitiveservices-speech/azure.cognitiveservices.speech.speechsynthesisbookmarkeventargs?view=azure-python SpeechSynthesisCancellationDetails: Description: Contains detailed information about why a result was canceled. Link: https://learn.microsoft.com/en-us/python/api/azure-cognitiveservices-speech/azure.cognitiveservices.speech.speechsynthesiscancellationdetails?view=azure-python SpeechSynthesisEventArgs: Description: Class for speech synthesis event arguments. Constructor for internal use. Link: https://learn.microsoft.com/en-us/python/api/azure-cognitiveservices-speech/azure.cognitiveservices.speech.speechsynthesiseventargs?view=azure-python SpeechSynthesisResult: Description: Result of a speech synthesis operation. Constructor for internal use. Link: https://learn.microsoft.com/en-us/python/api/azure-cognitiveservices-speech/azure.cognitiveservices.speech.speechsynthesisresult?view=azure-python SpeechSynthesisVisemeEventArgs: Description: Class for speech synthesis viseme event arguments. Added in version 1.16.0. Constructor for internal use. Link: https://learn.microsoft.com/en-us/python/api/azure-cognitiveservices-speech/azure.cognitiveservices.speech.speechsynthesisvisemeeventargs?view=azure-python SpeechSynthesisWordBoundaryEventArgs: Description: Class for speech synthesis word boundary event arguments. Updated in version 1.21.0. Constructor for internal use. Link: https://learn.microsoft.com/en-us/python/api/azure-cognitiveservices-speech/azure.cognitiveservices.speech.speechsynthesiswordboundaryeventargs?view=azure-python ``` -------------------------------- ### Synthesis Voice and Timing Information Classes Source: https://learn.microsoft.com/en-us/python/api/?view=azure-python/azure-cognitiveservices-speech/azure.cognitiveservices Documentation for classes related to synthesis voices and syllable-level timing results. These provide details about available voices and timing information for synthesized speech. ```APIDOC SyllableLevelTimingResult: Description: Contains syllable level timing result. Added in version 1.20.0. Link: https://learn.microsoft.com/en-us/python/api/azure-cognitiveservices-speech/azure.cognitiveservices.speech.syllableleveltimingresult?view=azure-python SynthesisVoicesResult: Description: Contains detailed information about the retrieved synthesis voices list. Added in version 1.16.0. Constructor for internal use. Link: https://learn.microsoft.com/en-us/python/api/azure-cognitiveservices-speech/azure.cognitiveservices.speech.synthesisvoicesresult?view=azure-python VoiceInfo: Description: Contains detailed information about the synthesis voice information. Updated in version 1.17.0. Constructor for internal use. Link: https://learn.microsoft.com/en-us/python/api/azure-cognitiveservices-speech/azure.cognitiveservices.speech.voiceinfo?view=azure-python ``` -------------------------------- ### KeywordRecognitionEventArgs Class Source: https://learn.microsoft.com/en-us/python/api/?view=azure-python/azure-cognitiveservices-speech/azure.cognitiveservices Class for keyword recognition event arguments. Constructor is for internal use. ```APIDOC KeywordRecognitionEventArgs: Description: Class for keyword recognition event arguments. Constructor for internal use. Link: https://learn.microsoft.com/en-us/python/api/azure-cognitiveservices-speech/azure.cognitiveservices.speech.keywordrecognitioneventargs?view=azure-python ``` -------------------------------- ### Azure Speech SDK - PronunciationAssessmentConfig Source: https://learn.microsoft.com/en-us/python/api/?view=azure-python/azure-cognitiveservices-speech/azure.cognitiveservices PronunciationAssessmentConfig represents the configuration for pronunciation assessment. It can be initialized either by passing specific parameters like reference text, grading system, granularity, miscue enablement, and scenario ID, or by providing a JSON string. Detailed parameter information can be found in the Microsoft Azure documentation. ```APIDOC PronunciationAssessmentConfig: Represents pronunciation assessment configuration. Added in version 1.14.0. Initialization: * from parameters: pass reference text, grading system, granularity, enable miscue and scenario id. * from json: pass a json string For parameter details, see https://docs.microsoft.com/azure/cognitive-services/speech-service/rest-speech-to-text#pronunciation-assessment-parameters ``` -------------------------------- ### Azure Speech SDK - Property Collection Source: https://learn.microsoft.com/en-us/python/api/?view=azure-python/azure-cognitiveservices-speech/azure.cognitiveservices Manages collections of properties for various configurations within the Azure Cognitive Services Speech SDK. ```APIDOC PropertyCollection: https://learn.microsoft.com/en-us/python/api/azure-cognitiveservices-speech/azure.cognitiveservices.speech.propertycollection?view=azure-python ``` -------------------------------- ### Azure Cognitive Services Speech SDK Source: https://learn.microsoft.com/en-us/python/api/?view=azure-python/azure-cognitiveservices-speech/azure.cognitiveservices Provides access to the latest and preview versions of the Azure Cognitive Services Speech SDK for Python. This SDK enables developers to integrate speech-to-text, text-to-speech, and other speech-related functionalities into their Python applications. ```python from azure.cognitiveservices.speech import SpeechConfig, SpeechRecognizer # Replace with your subscription key and service region speech_key = "YOUR_SPEECH_KEY" speech_region = "YOUR_SPEECH_REGION" speech_config = SpeechConfig(subscription=speech_key, region=speech_region) # Example: Speech to text from microphone # audio_config = AudioConfig(use_default_microphone=True) # speech_recognizer = SpeechRecognizer(speech_config=speech_config, audio_config=audio_config) # print("Say something...") # result = speech_recognizer.recognize_once_async().get() # if result.reason == ResultReason.RecognizedSpeech: # print(f"RECOGNIZED: Text={result.text}") # elif result.reason == ResultReason.NoMatch: # print("NOMATCH: Speech could not be recognized.") # elif result.reason == ResultReason.Canceled: # cancellation_details = result.cancellation_details # print(f"CANCELED: Reason={cancellation_details.reason}") # if cancellation_details.reason == CancellationReason.Error: # print(f"CANCELED: ErrorCode={cancellation_details.error_code}") # print(f"CANCELED: ErrorDetails={cancellation_details.error_details}") ``` -------------------------------- ### AzureCognitiveservicesSpeech API Reference Source: https://learn.microsoft.com/en-us/python/api/?view=azure-python/azure-cognitiveservices-speech/azure.cognitiveservices This section details the Azure Cognitive Services Speech SDK for Python, including its core classes and methods for speech recognition, synthesis, and translation. It outlines the structure of the SDK, common parameters, and return types for various operations. ```APIDOC azure.cognitiveservices.speech This module provides the core functionality for the Azure Cognitive Services Speech SDK for Python. Classes: SpeechConfig: Configures the speech service connection, including subscription key, region, and language. __init__(subscription_key: str, region: str) subscription_key: Your Azure Cognitive Services subscription key. region: The Azure region where your speech resource is located. AudioConfig: Specifies the audio input or output for speech operations. from_default_microphone(): Creates an AudioConfig from the default microphone. from_wav_file_input(filename: str): filename: The path to the WAV audio file. SpeechRecognizer: Performs speech recognition from audio input. __init__(speech_config: SpeechConfig, audio_config: AudioConfig = None) speech_config: The SpeechConfig object. audio_config: The AudioConfig object (defaults to default microphone). recognize_once(): Recognizes a single utterance from the audio input. Returns: A SpeechRecognitionResult object. start_continuous_recognition(callback: Callable[[SpeechRecognitionResult], None]): Starts continuous recognition. callback: A function to be called with each recognition result. stop_continuous_recognition(): Stops continuous recognition. SpeechSynthesisConfig: Configures speech synthesis parameters. __init__(speech_language: str = 'en-US') speech_language: The language for speech synthesis. SpeechSynthesizer: Synthesizes speech from text. __init__(speech_config: SpeechConfig, audio_config: AudioConfig = None) speech_config: The SpeechConfig object. audio_config: The AudioConfig object (defaults to default speaker). speak_text_async(text: str): Synthesizes speech from the given text asynchronously. text: The text to synthesize. Returns: A SpeechSynthesisResult object. TranslationConfig: Configures speech translation parameters. __init__(subscription_key: str, region: str, ...) subscription_key: Your Azure Cognitive Services subscription key. region: The Azure region where your speech resource is located. target_languages: A list of target languages for translation. TranslationRecognizer: Performs speech translation. __init__(translation_config: TranslationConfig, audio_config: AudioConfig = None) translation_config: The TranslationConfig object. audio_config: The AudioConfig object (defaults to default microphone). recognize_once_async(): Translates a single utterance from the audio input. Returns: A TranslationRecognitionResult object. Common Result Objects: SpeechRecognitionResult: result_id: The unique ID of the recognition result. text: The recognized text. reason: The reason for the recognition (e.g., RecognizedSpeech, NoMatch). duration: The duration of the recognized speech. TranslationRecognitionResult: result_id: The unique ID of the translation result. text: The original recognized text. translations: A dictionary of translations keyed by target language. reason: The reason for the recognition (e.g., RecognizedSpeech, NoMatch). Error Handling: Exceptions may be raised for invalid configurations, network issues, or service errors. Refer to the SDK documentation for specific exception types. ``` -------------------------------- ### Azure Speech SDK - Profanity and Pronunciation Assessment Source: https://learn.microsoft.com/en-us/python/api/?view=azure-python/azure-cognitiveservices-speech/azure.cognitiveservices Configuration options for profanity filtering and detailed classes for pronunciation assessment, including grading, granularity, and results. ```APIDOC ProfanityOption: https://learn.microsoft.com/en-us/python/api/azure-cognitiveservices-speech/azure.cognitiveservices.speech.profanityoption?view=azure-python PronunciationAssessmentConfig: https://learn.microsoft.com/en-us/python/api/azure-cognitiveservices-speech/azure.cognitiveservices.speech.pronunciationassessmentconfig?view=azure-python PronunciationAssessmentGradingSystem: https://learn.microsoft.com/en-us/python/api/azure-cognitiveservices-speech/azure.cognitiveservices.speech.pronunciationassessmentgradingsystem?view=azure-python PronunciationAssessmentGranularity: https://learn.microsoft.com/en-us/python/api/azure-cognitiveservices-speech/azure.cognitiveservices.speech.pronunciationassessmentgranularity?view=azure-python PronunciationAssessmentPhonemeResult: https://learn.microsoft.com/en-us/python/api/azure-cognitiveservices-speech/azure.cognitiveservices.speech.pronunciationassessmentphonemeresult?view=azure-python PronunciationAssessmentResult: https://learn.microsoft.com/en-us/python/api/azure-cognitiveservices-speech/azure.cognitiveservices.speech.pronunciationassessmentresult?view=azure-python PronunciationAssessmentWordResult: https://learn.microsoft.com/en-us/python/api/azure-cognitiveservices-speech/azure.cognitiveservices.speech.pronunciationassessmentwordresult?view=azure-python ``` -------------------------------- ### Azure Speech SDK - Recognition and Cancellation Source: https://learn.microsoft.com/en-us/python/api/?view=azure-python/azure-cognitiveservices-speech/azure.cognitiveservices Classes related to speech recognition, including auto-detection of source language, cancellation details, and reasons. ```APIDOC AutoDetectSourceLanguageResult: https://learn.microsoft.com/en-us/python/api/azure-cognitiveservices-speech/azure.cognitiveservices.speech.autodetectsourcelanguageresult?view=azure-python CancellationDetails: https://learn.microsoft.com/en-us/python/api/azure-cognitiveservices-speech/azure.cognitiveservices.speech.cancellationdetails?view=azure-python CancellationErrorCode: https://learn.microsoft.com/en-us/python/api/azure-cognitiveservices-speech/azure.cognitiveservices.speech.cancellationerrorcode?view=azure-python CancellationReason: https://learn.microsoft.com/en-us/python/api/azure-cognitiveservices-speech/azure.cognitiveservices.speech.cancellationreason?view=azure-python NoMatchDetails: https://learn.microsoft.com/en-us/python/api/azure-cognitiveservices-speech/azure.cognitiveservices.speech.nomatchdetails?view=azure-python NoMatchReason: https://learn.microsoft.com/en-us/python/api/azure-cognitiveservices-speech/azure.cognitiveservices.speech.nomatchreason?view=azure-python ``` -------------------------------- ### CancellationDetails Class Source: https://learn.microsoft.com/en-us/python/api/?view=azure-python/azure-cognitiveservices-speech/azure.cognitiveservices Provides details about a cancellation event. ```APIDOC CancellationDetails: Description: Represents cancellation details. Link: https://learn.microsoft.com/en-us/python/api/azure-cognitiveservices-speech/azure.cognitiveservices.speech.cancellationdetails?view=azure-python ``` -------------------------------- ### Diagnostics Module Source: https://learn.microsoft.com/en-us/python/api/?view=azure-python/azure-cognitiveservices-speech/azure.cognitiveservices Reference to the diagnostics module within the azure.cognitiveservices.speech package. This module is likely used for managing and configuring diagnostic logging for the Speech SDK. ```APIDOC azure.cognitiveservices.speech.diagnostics: Module for managing diagnostics and logging within the Speech SDK. Likely contains classes or functions for configuring log levels, output destinations, and other diagnostic settings. ``` -------------------------------- ### Azure Speech SDK - Recognizer Classes Source: https://learn.microsoft.com/en-us/python/api/?view=azure-python/azure-cognitiveservices-speech/azure.cognitiveservices This section covers the recognizer classes available in the Azure Speech SDK for Python. It includes KeywordRecognizer for keyword spotting, Recognizer as the base class for all recognizers, and SourceLanguageRecognizer for standalone language recognition or continuous language detection, introduced in version 1.18.0. ```APIDOC KeywordRecognizer: A keyword recognizer. ``` ```APIDOC Recognizer: Base class for different recognizers. ``` ```APIDOC SourceLanguageRecognizer: A source language recognizer - standalone language recognizer, can be used for single language or continuous language detection. Added in version 1.18.0. ``` -------------------------------- ### KeywordRecognitionModel Class Source: https://learn.microsoft.com/en-us/python/api/?view=azure-python/azure-cognitiveservices-speech/azure.cognitiveservices Represents a model used for keyword recognition. ```APIDOC KeywordRecognitionModel: Description: Represents a keyword recognition model. Link: https://learn.microsoft.com/en-us/python/api/azure-cognitiveservices-speech/azure.cognitiveservices.speech.keywordrecognitionmodel?view=azure-python ``` -------------------------------- ### Azure Speech SDK - Result Objects Source: https://learn.microsoft.com/en-us/python/api/?view=azure-python/azure-cognitiveservices-speech/azure.cognitiveservices This section details various result objects used in the Azure Speech SDK for Python. These include KeywordRecognitionResult for keyword recognition outcomes, NoMatchDetails for cases where no match is found, PronunciationAssessmentPhonemeResult and PronunciationAssessmentWordResult for detailed pronunciation feedback at phoneme and word levels respectively, PronunciationAssessmentResult for overall pronunciation assessment, RecognitionEventArgs and SessionEventArgs for event data, RecognitionResult for detailed recognition outcomes, and ResultFuture for asynchronous operation results. ```APIDOC KeywordRecognitionResult: Result of a keyword recognition operation. Constructor for internal use. ``` ```APIDOC NoMatchDetails: Details for no match scenarios. ``` ```APIDOC PronunciationAssessmentPhonemeResult: Contains phoneme level pronunciation assessment result. Added in version 1.14.0. ``` ```APIDOC PronunciationAssessmentResult: Represents pronunciation assessment result. Added in version 1.14.0. The result can be initialized from a speech recognition result. ``` ```APIDOC PronunciationAssessmentWordResult: Contains word level pronunciation assessment result. Added in version 1.14.0. ``` ```APIDOC RecognitionEventArgs: Provides data for the RecognitionEvent. Constructor for internal use. ``` ```APIDOC RecognitionResult: Detailed information about the result of a recognition operation. Constructor for internal use. ``` ```APIDOC ResultFuture: The result of an asynchronous operation. Private constructor. ``` ```APIDOC SessionEventArgs: Base class for session event arguments. Constructor for internal use. ``` -------------------------------- ### Speech Recognition Classes Source: https://learn.microsoft.com/en-us/python/api/?view=azure-python/azure-cognitiveservices-speech/azure.cognitiveservices Documentation for classes related to speech recognition events and results. These classes are used internally by the SDK to manage recognition processes. ```APIDOC SpeechRecognitionCanceledEventArgs: Description: Class for speech recognition canceled event arguments. Constructor for internal use. Link: https://learn.microsoft.com/en-us/python/api/azure-cognitiveservices-speech/azure.cognitiveservices.speech.speechrecognitioncanceledeventargs?view=azure-python SpeechRecognitionEventArgs: Description: Class for speech recognition event arguments. Constructor for internal use. Link: https://learn.microsoft.com/en-us/python/api/azure-cognitiveservices-speech/azure.cognitiveservices.speech.speechrecognitioneventargs?view=azure-python SpeechRecognitionResult: Description: Base class for speech recognition results. Constructor for internal use. Link: https://learn.microsoft.com/en-us/python/api/azure-cognitiveservices-speech/azure.cognitiveservices.speech.speechrecognitionresult?view=azure-python ``` -------------------------------- ### SpeechSynthesizer Class Source: https://learn.microsoft.com/en-us/python/api/?view=azure-python/azure-cognitiveservices-speech/azure.cognitiveservices Documentation for the SpeechSynthesizer class, used for performing speech synthesis operations. ```APIDOC SpeechSynthesizer: Description: A speech synthesizer. Link: https://learn.microsoft.com/en-us/python/api/azure-cognitiveservices-speech/azure.cognitiveservices.speech.speechsynthesizer?view=azure-python ``` -------------------------------- ### Azure Cognitive Services Speech SDK Source: https://learn.microsoft.com/en-us/python/api/?view=azure-python/azure-cognitiveservices-speech/azure.cognitiveservices Overview of the Microsoft Speech SDK for Python, part of Azure Cognitive Services. It enables speech-related functionalities like speech synthesis and recognition. ```APIDOC azure.cognitiveservices.speech: Microsoft Speech SDK for Python. Provides APIs for speech recognition, synthesis, translation, and speaker recognition. ``` -------------------------------- ### Azure Cognitive Services Speech API Reference Source: https://learn.microsoft.com/en-us/python/api/?view=azure-python/azure-cognitiveservices-speech/azure.cognitiveservices Provides access to the Azure Cognitive Services Speech SDK for Python. This includes classes and methods for speech recognition, synthesis, translation, and more. It is essential for developing speech-enabled applications on Azure. ```APIDOC azure.cognitiveservices.speech.SpeechConfig __init__(subscription_key: str, region: str) subscription_key: Your Azure subscription key for Cognitive Services. region: The Azure region where your Cognitive Services resource is located. speech_recognition_mode: Enum value for the recognition mode (e.g., INTERACTIVE, CONVERSATIONAL, DICTATION). endpoint: The service endpoint to use for speech services. azure.cognitiveservices.speech.SpeechRecognizer __init__(speech_config: SpeechConfig, audio_config: AudioConfig = None) speech_config: An instance of SpeechConfig. audio_config: An instance of AudioConfig specifying the audio input source. recognize_once_async() -> ResultFuture Starts speech recognition and returns the result asynchronously. Returns: A future object that will contain the recognition result. start_continuous_recognition_async() -> ResultFuture Starts continuous speech recognition. stop_continuous_recognition_async() -> ResultFuture Stops continuous speech recognition. azure.cognitiveservices.speech.AudioConfig from_default_microphone(custom_microphone_device_id: str = None) Creates an AudioConfig from the default microphone. custom_microphone_device_id: Optional ID for a custom microphone device. from_wav_file(filename: str) Creates an AudioConfig from a WAV audio file. filename: The path to the WAV file. ``` -------------------------------- ### Connection Management Source: https://learn.microsoft.com/en-us/python/api/?view=azure-python/azure-cognitiveservices-speech/azure.cognitiveservices Manages the connection to the speech service. Allows explicit opening and closing of connections, and subscription to connection status changes. The Connection class is optional and intended for scenarios requiring fine-grained control over connection behavior. ```APIDOC Connection: Description: Proxy class for managing the connection to the speech service of the specified Recognizer. By default, a Recognizer autonomously manages connection to service when needed. The Connection class provides additional methods for users to explicitly open or close a connection and to subscribe to connection status changes. The use of Connection is optional. It is intended for scenarios where fine tuning of application behavior based on connection status is needed. Users can optionally call open to manually initiate a service connection before starting recognition on the Recognizer associated with this Connection. After starting a recognition, calling open or close might fail. This will not impact the Recognizer or the ongoing recognition. Connection might drop for various reasons, the Recognizer will always try to reinstitute the connection as required to guarantee ongoing operations. In all these cases connected/disconnected events will indicate the change of the connection status. Updated in version 1.17.0. Constructor for internal use. Methods: open(): Manually initiate a service connection. close(): Close the service connection. connected: Event signal for connection established. disconnected: Event signal for connection lost. Link: https://learn.microsoft.com/en-us/python/api/azure-cognitiveservices-speech/azure.cognitiveservices.speech.connection?view=azure-python ``` -------------------------------- ### Azure Cognitive Services Speech SDK - Core Classes Source: https://learn.microsoft.com/en-us/python/api/?view=azure-python/azure-cognitiveservices-speech/azure.cognitiveservices This section documents core classes within the Azure Cognitive Services Speech SDK for Python, including those for speech recognition, synthesis, and event handling. It covers essential components like SpeechConfig, Recognizer, SpeechSynthesizer, and various event argument classes. ```APIDOC PropertyId: Represents property identifiers used in the Speech SDK. RecognitionEventArgs: Base class for recognition event arguments. RecognitionResult: Represents the result of a recognition operation. Recognizer: Abstract base class for recognizers. ResultFuture: Represents a future result of an asynchronous operation. ResultReason: Enumeration for the reason of a recognition result. ServicePropertyChannel: Specifies the channel for service properties. SessionEventArgs: Base class for session event arguments. SourceLanguageRecognizer: Recognizer for source language identification. SpeechConfig: Configuration for speech services. __init__(subscription_key: str, region: str) Initializes SpeechConfig with subscription key and region. speech_language: str Gets or sets the speech language. output_format: SpeechSynthesisOutputFormat Gets or sets the output format for speech synthesis. SpeechRecognitionCanceledEventArgs: Event arguments for canceled recognition. SpeechRecognitionEventArgs: Event arguments for speech recognition events. SpeechRecognitionResult: Represents the result of a speech recognition operation. SpeechRecognizer: Main class for speech recognition. RecognizeOnceAsync(): Performs a one-time speech recognition. StartContinuousRecognitionAsync(): Starts continuous speech recognition. StopContinuousRecognitionAsync(): Stops continuous speech recognition. SpeechSynthesisBookmarkEventArgs: Event arguments for speech synthesis bookmarks. SpeechSynthesisCancellationDetails: Details for speech synthesis cancellation. SpeechSynthesisEventArgs: Event arguments for speech synthesis events. SpeechSynthesisOutputFormat: Enumeration for speech synthesis output formats. SpeechSynthesisResult: Represents the result of a speech synthesis operation. SpeechSynthesisVisemeEventArgs: Event arguments for speech synthesis visemes. SpeechSynthesisWordBoundaryEventArgs: Event arguments for speech synthesis word boundaries. SpeechSynthesizer: Main class for speech synthesis. SpeakTextAsync(text: str): Synthesizes speech from text. SpeakSsmlAsync(ssml: str): Synthesizes speech from SSML. StreamStatus: Represents the status of an audio stream. SyllableLevelTimingResult: Timing result for syllables. SynthesisVoiceGender: Enumeration for synthesis voice genders. SynthesisVoiceType: Enumeration for synthesis voice types. SynthesisVoicesResult: Result containing available synthesis voices. ``` -------------------------------- ### VoiceInfo Class Reference Source: https://learn.microsoft.com/en-us/python/api/?view=azure-python/azure-cognitiveservices-speech/azure.cognitiveservices Provides a reference to the VoiceInfo class within the azure.cognitiveservices.speech library. This class likely contains information about available speech voices. ```APIDOC VoiceInfo: Represents information about a specific voice. Likely includes properties such as voice name, gender, locale, and other relevant attributes for speech synthesis. ``` -------------------------------- ### Azure Speech SDK - PropertyCollection Source: https://learn.microsoft.com/en-us/python/api/?view=azure-python/azure-cognitiveservices-speech/azure.cognitiveservices The PropertyCollection class provides functionality to retrieve or set property values within a property collection. This is a utility class for managing configuration properties. ```APIDOC PropertyCollection: Class to retrieve or set a property value from a property collection. ``` -------------------------------- ### Azure Speech SDK Enums Source: https://learn.microsoft.com/en-us/python/api/?view=azure-python/azure-cognitiveservices-speech/azure.cognitiveservices This section lists and describes the various enumerations provided by the Azure Cognitive Services Speech SDK for Python. These enums are used to represent specific states, reasons, formats, and configurations within the SDK. ```APIDOC AudioStreamContainerFormat: Defines supported audio stream container format. AudioStreamWaveFormat: Represents the format specified inside WAV container. CancellationErrorCode: Defines error code in case that CancellationReason is Error. CancellationReason: Defines the possible reasons a recognition result might be canceled. NoMatchReason: Defines the possible reasons a recognition result might not be recognized. OutputFormat: Output format. ProfanityOption: Removes profanity (swearing), or replaces letters of profane words with stars. PronunciationAssessmentGradingSystem: Defines the point system for pronunciation score calibration; default value is FivePoint. PronunciationAssessmentGranularity: Defines the pronunciation evaluation granularity; default value is Phoneme. PropertyId: Defines speech property ids. ResultReason: Specifies the possible reasons a recognition result might be generated. ServicePropertyChannel: Defines channels used to pass property settings to service. SpeechSynthesisOutputFormat: Defines the possible speech synthesis output audio formats. StreamStatus: Defines the possible status of audio data stream. SynthesisVoiceGender: Defines the gender of synthesis voices. SynthesisVoiceType: Defines the type of synthesis voices. ``` -------------------------------- ### Azure Speech SDK - PhraseListGrammar Source: https://learn.microsoft.com/en-us/python/api/?view=azure-python/azure-cognitiveservices-speech/azure.cognitiveservices The PhraseListGrammar class allows for the runtime addition of phrase hints to improve speech recognition accuracy. Phrases added are effective immediately for the next recognition or upon reconnection to the speech service. This feature was added in version 1.5.0. ```APIDOC PhraseListGrammar: Allows runtime addition of phrase hints to aid in speech recognition. Phrases added to the recognizer are effective at the start of the next recognition, or the next time the speech recognizer must reconnect to the speech service. Added in version 1.5.0. Constructor for internal use. ``` -------------------------------- ### SpeechRecognizer Class Source: https://learn.microsoft.com/en-us/python/api/?view=azure-python/azure-cognitiveservices-speech/azure.cognitiveservices Documentation for the SpeechRecognizer class, used for speech recognition operations. It allows specifying language, source language configuration, or auto-detection of the source language. ```APIDOC SpeechRecognizer: Description: A speech recognizer. If you need to specify source language information, please only specify one of these three parameters, language, source_language_config or auto_detect_source_language_config. Link: https://learn.microsoft.com/en-us/python/api/azure-cognitiveservices-speech/azure.cognitiveservices.speech.speechrecognizer?view=azure-python ``` -------------------------------- ### ConnectionEventArgs Class Source: https://learn.microsoft.com/en-us/python/api/?view=azure-python/azure-cognitiveservices-speech/azure.cognitiveservices Provides data for connection-related events. Added in version 1.2.0. ```APIDOC ConnectionEventArgs: Description: Provides data for the ConnectionEvent. Added in version 1.2.0 Constructor for internal use. Link: https://learn.microsoft.com/en-us/python/api/azure-cognitiveservices-speech/azure.cognitiveservices.speech.connectioneventargs?view=azure-python ``` -------------------------------- ### EventSignal Class Source: https://learn.microsoft.com/en-us/python/api/?view=azure-python/azure-cognitiveservices-speech/azure.cognitiveservices Allows clients to connect to and disconnect from an event signal to receive or stop receiving events. Constructor is for internal use. ```APIDOC EventSignal: Description: Clients can connect to the event signal to receive events, or disconnect from the event signal to stop receiving events. Constructor for internal use. Link: https://learn.microsoft.com/en-us/python/api/azure-cognitiveservices-speech/azure.cognitiveservices.speech.eventsignal?view=azure-python ``` -------------------------------- ### AutoDetectSourceLanguageResult Class Source: https://learn.microsoft.com/en-us/python/api/?view=azure-python/azure-cognitiveservices-speech/azure.cognitiveservices Represents the result of an automatic source language detection. This result can be initialized from a speech recognition result. ```APIDOC AutoDetectSourceLanguageResult: Description: Represents auto detection source language result. The result can be initialized from a speech recognition result. Link: https://learn.microsoft.com/en-us/python/api/azure-cognitiveservices-speech/azure.cognitiveservices.speech.autodetectsourcelanguageresult?view=azure-python ``` -------------------------------- ### AudioDataStream Class Source: https://learn.microsoft.com/en-us/python/api/?view=azure-python/azure-cognitiveservices-speech/azure.cognitiveservices Represents an audio data stream used for operating audio data as a stream. It can generate an audio data stream from a speech synthesis result or a keyword recognition result. ```APIDOC AudioDataStream: Description: Represents audio data stream used for operating audio data as a stream. Generates an audio data stream from a speech synthesis result (type SpeechSynthesisResult) or a keyword recognition result (type KeywordRecognitionResult). Link: https://learn.microsoft.com/en-us/python/api/azure-cognitiveservices-speech/azure.cognitiveservices.speech.audiodatastream?view=azure-python ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.