Skill 2.2.3

Build a lightweight application by using Azure Speech in Foundry Tools

Key Concepts

The Python Speech SDK is the azure-cognitiveservices-speech package. A SpeechConfig identifies the Foundry resource (by endpoint or region) and authenticates with a key or a Microsoft Entra ID token; it also sets the recognition language and the synthesis voice. An AudioConfig chooses the audio source or destination: the default microphone or speaker, a file or a stream.

For recognition, a SpeechRecognizer runs recognize_once_async() for a single utterance or continuous recognition with events for longer audio. For synthesis, a SpeechSynthesizer runs speak_text_async() with plain text or speak_ssml_async() with SSML to control voice, pauses and pronunciation, writing to a speaker or a WAV file. Results include a reason that shows whether recognition or synthesis succeeded. The Foundry portal's speech playgrounds let you try both directions before coding.