An API for converting text to voice.
-
Clone the repository:
git clone https://github.com/yourusername/text-2-voice.git cd text-2-voice
-
Create and activate a virtual environment:
python3 -m venv venv source venv/bin/activate
-
Install the required dependencies:
pip install -r requirements.txt
-
Create a
.env
file in the root directory and add your environment variables:SECRET_KEY=your_secret_key DEBUG=True
-
Run the server using
uvicorn
:uvicorn main:app --reload --log-config logging_config.json
Or without logging config:
uvicorn main:app --reload
Or using
python3
:python3 main.py
-
Run the server:
python manage.py runserver
-
Open your browser and navigate to:
http://127.0.0.1:8000/create_voice/your_text
To convert "Hello World" to voice, use the following URL:
http://127.0.0.1:8000/create_voice/Hello%20World