This is an API for generating text-to-speech using Azure Cognitive Services.
Run:
pip install -r requirements.txt
Create a .env
file:
SPEECH_KEY=your_key
SERVICE_REGION=your_region
- Visit the Azure AI Services page.
- Create a new resource in Azure by selecting "Speech service".
- In the resource's dashboard, navigate to the "Keys and endpoint" section.
- Find "KEY 1". This is your
SPEECH_KEY
. - Locate the "Location/Region" info. This is your
SERVICE_REGION
.
- Run the FastAPI server:
uvicorn main:app --reload
- Open your browser and go to
http://127.0.0.1:8000/docs
to view the Swagger documentation. - Use the provided endpoints to generate text-to-speech based on your requirements.
- Supported languages of Azure Speech service.
- How to custom speaking styles and roles.
- Documentation made with Swagger.