Logo Lanfrica

GhostWire619/SWAHILI_VOICE_CLONING

Domain:

natural language processing

Record type:

software
Creator:
Gho
Host:
# Swahili Voice Cloning API A FastAPI-based service for Swahili text-to-speech (TTS) generation using fine-tuned models. ## Overview This API provides endpoints for: 1. Text-to-speech conversion using various Swahili voice models 2. Managing training text data for voice models 3. Importing and exporting training data ## API Endpoints ### Documentation Endpoints ## Example Usage Using curl: ```bash curl -X POST "localhost" \ -H "Content-Type: application/json" \ -d '{"text":"Kijana huyu ni msataarabu sana sana"}' \ --output output.wav ``` Using Python requests: ```python import requests response = requests.post( "localhost", json={"text": "Kijana huyu ni msataarabu sana sana"} ) with open("output.wav", "wb") as f: f.write(response.content) ``` #### Get API Documentation ``` GET /docs ``` Interactive API documentation (Swagger UI) #### Get Readme ``` GET /readme ``` Returns the API readme as text/markdown #### Download Readme ``` GET /readme/download ``` Downloads the API readme as a markdown file ### Text-to-Speech (TTS) Endpoints #### Generate Speech with Benny's Voice ``` POST /tts/benny ``` Converts Swahili text to speech using the Benny voice model. **Request Body:** ```json { "text": "Habari, ninaitwa Benny." } ``` **Response:** Audio file (WAV format) #### Generate Speech with Briget's Voice ``` POST /tts/briget ``` Converts Swahili text to speech using the Briget voice model. **Request Body:** ```json { "text": "Habari, ninaitwa Briget." } ``` **Response:** Audio file (WAV format) #### Generate Speech with Emanuela's Voice ``` POST /tts/emanuela ``` Converts Swahili text to speech using the Emanuela voice model. **Request Body:** ```json { "text": "Habari, ninaitwa Emanuela." } ``` **Response:** Audio file (WAV format) (NOTE numbers get normalized automatically) #### Debug Number Conversion ``` POST /debug/number-conversion ``` Debug endpoint to test number normalization in Swahili text. **Requ …