Backend of speech synthesis application.
Explore the docs »
View Demo
·
Report Bug
·
Request Feature
Table of Contents
The back-end server for speech synthesis applications, Tone Helper.
With the API provided by the server, you can do:
- speech recognition
- pitch detection
- file conversion
- speech synthesis
Of course, since your needs may be different, you are very welcome to suggest changes by forking this repo and creating a pull request or opening an issue!
- Python 3.7
- HTTPS Server
-
Clone the repo
git clone https://github.com/Shulammiteya/Tone-Helper-Backend.git
-
Install libraries
pip3 install pydub SoundFile pyworld google-cloud-core
-
Create your own credential file in the root directory
touch ./sample.json
-
Run the server
python3 backend.py
| API | stt | tune | getURL |
|---|---|---|---|
| Method | POST | POST | GET |
input:
| Key | Type | Value | Description |
|---|---|---|---|
| audio | audio/m4a | Audio files for speech recognition, pitch detection, and transcoding |
output:
| Key | Type | Value | Description |
|---|---|---|---|
| audio | base64 | ...BwbGVhc3VyZS4= | WAV file encoded in base64 |
| wordInfo | array |
[ { "word": "一", "start": 27002, "end": 98000, "f0": 440.15, "f0Start": 54, "f0End": 196 }, { ... }, ... ] |
"word": the Speech-recognized text "start": the starting position in the audio array "end": the end position in the audio array "f0": the average F0 "f0Start": the starting position in the f0 array "f0End": the end position in the f0 array |
input:
| Key | Type | Value | Description |
|---|---|---|---|
| audio | audio/wav | Audio file to be tuned | |
| f0 | JSON |
{ 659.26, 659.26, 440.00, ... } |
Designated F0 |
output:
| Key | Type | Value | Description |
|---|---|---|---|
| data | base64 | ...BwbGVhc3VyZS4= | Synthesized audio encoded in base64 |
output:
| Key | Type | Value | Description |
|---|---|---|---|
| data | string | https://youtu.be/... | Introductory video URL |
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
About me: Hsin-Hsin, Chen - shulammite302332@gmail.com
Project Link: https://github.com/Shulammiteya/Tone-Helper-Backend