Azure
Orate supports Azure's speech and transcription services.
Azure Cognitive Services by Microsoft are a collection of artificial intelligence (AI) APIs that help developers create applications with advanced AI capabilities. These services are available on Microsoft Azure, a cloud computing platform.
Setup
The Azure provider is available by default in Orate. To import it, you can use the following code:
Configuration
You can use Azure by creating a new instance of the Azure
class:
This will use the AZURE_API_KEY
and AZURE_REGION
environment variables. If you don't have these variables set, you can pass your keys as an argument to the constructor.
Usage
The Azure provider provides a single interface for all of Azure's speech and transcription services.
Text to Speech
The Azure provider provides a tts
function that allows you to create a text-to-speech synthesis function using Azure Speech Service.
You can specify the voice to use by passing it as an argument to the tts
function.
You can also stream the speech.
Speech to Text
The Azure provider provides a stt
function that allows you to create a speech-to-text transcription function using Azure Speech Service.
You can also stream the transcription.