Update README.md
Browse files
README.md
CHANGED
@@ -1,3 +1,165 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<!-- Improved compatibility of back to top-->
|
2 |
+
<a id="readme-top"></a>
|
3 |
+
<!-- PROJECT LOGO -->
|
4 |
+
<br />
|
5 |
+
<div align="left">
|
6 |
+
|
7 |
+
<h3 align="center">OpenSpeech TTS API</h3>
|
8 |
+
|
9 |
+
<p align="center">
|
10 |
+
A simple and effective Text-to-Speech API compatible with OpenAI's endpoint
|
11 |
+
<br />
|
12 |
+
<a href="https://github.com/PantelisDeveloping"><strong>Explore the docs »</strong></a>
|
13 |
+
<br />
|
14 |
+
<br />
|
15 |
+
<a href="https://github.com/PantelisDeveloping">View Demo</a>
|
16 |
+
·
|
17 |
+
<a href="https://github.com/PantelisDeveloping">Report Bug</a>
|
18 |
+
·
|
19 |
+
<a href="https://github.com/PantelisDeveloping>Request Feature</a>
|
20 |
+
</p>
|
21 |
+
</div>
|
22 |
+
|
23 |
+
<!-- ABOUT THE PROJECT -->
|
24 |
+
## About The Project
|
25 |
+
|
26 |
+
OpenSpeech TTS is a user-friendly and efficient Text-to-Speech (TTS) API designed to seamlessly integrate with OpenAI's powerful text-to-speech capabilities. This project aims to provide developers with a simple and effective tool to convert text into natural-sounding speech, making it ideal for various applications such as voice assistants, audiobooks, and accessibility tools.
|
27 |
+
|
28 |
+
Key Features:
|
29 |
+
|
30 |
+
Compatibility with OpenAI's API: Leverages OpenAI's advanced text-to-speech models to deliver high-quality audio output.
|
31 |
+
Ease of Use: Provides a straightforward interface for developers to integrate TTS functionality into their projects.
|
32 |
+
Efficiency: Optimized for performance to ensure smooth and responsive TTS generation. No need for GPU.
|
33 |
+
|
34 |
+
<p align="right">(<a href="#readme-top">back to top</a>)</p>
|
35 |
+
|
36 |
+
|
37 |
+
|
38 |
+
### Built With
|
39 |
+
|
40 |
+
We used Python + Flask + Gevent WSGI for depolyment and Edge TTS for the TTS support.
|
41 |
+
|
42 |
+
<p align="right">(<a href="#readme-top">back to top</a>)</p>
|
43 |
+
|
44 |
+
|
45 |
+
|
46 |
+
<!-- GETTING STARTED -->
|
47 |
+
## Getting Started
|
48 |
+
|
49 |
+
This is how you will succesfully run your OpenSpeech TTS Server:
|
50 |
+
|
51 |
+
### Prerequisites
|
52 |
+
|
53 |
+
This is an example of how to list things you need to use the software and how to install them.
|
54 |
+
Python 3.10 + above with the following libarires in a virtual environment:
|
55 |
+
```sh
|
56 |
+
pip install Flask
|
57 |
+
pip install edge-tts
|
58 |
+
pip install cryptography
|
59 |
+
pip install gevent
|
60 |
+
pip install art
|
61 |
+
|
62 |
+
```
|
63 |
+
|
64 |
+
### Installation
|
65 |
+
|
66 |
+
_Below is a step by step installation guide to run succesfuly the TTS Server._
|
67 |
+
|
68 |
+
1. Clone the repo
|
69 |
+
```sh
|
70 |
+
git clone https://github.com/github_username/repo_name.git
|
71 |
+
```
|
72 |
+
3. Create & Activate a Virtual Environment in Python
|
73 |
+
```sh
|
74 |
+
python -m venv /path/to/new/virtual/environment
|
75 |
+
source <venv>/bin/activate
|
76 |
+
```
|
77 |
+
4. Run the api.py python
|
78 |
+
```js
|
79 |
+
cd ./openspeech-tts/main
|
80 |
+
python api.py
|
81 |
+
```
|
82 |
+
5. When prompted, enter the desired API key that you want to access the server & the Port to forward the API
|
83 |
+
```sh
|
84 |
+
Enter API Key: ....
|
85 |
+
Enter Port: ....
|
86 |
+
```
|
87 |
+
6. The server is up and ready to run!
|
88 |
+
|
89 |
+
<p align="right">(<a href="#readme-top">back to top</a>)</p>
|
90 |
+
|
91 |
+
|
92 |
+
|
93 |
+
<!-- USAGE EXAMPLES -->
|
94 |
+
## Usage
|
95 |
+
|
96 |
+
You can use the TTS API in the same way you use the OpenAI Text-to-Speech:
|
97 |
+
```sh
|
98 |
+
curl http://localhost:5000/v1/audio/speech \
|
99 |
+
-H "Authorization: Bearer API-KEY" \
|
100 |
+
-H "Content-Type: application/json" \
|
101 |
+
-d '{
|
102 |
+
"model": "tts-1",
|
103 |
+
"input": "Today is a wonderful day to build something people love!",
|
104 |
+
"voice": "alloy"
|
105 |
+
}' \
|
106 |
+
--output speech.mp3
|
107 |
+
```
|
108 |
+
|
109 |
+
_For the request example, please refer to the [Sample Request Curl](https://example.com)_
|
110 |
+
|
111 |
+
<p align="right">(<a href="#readme-top">back to top</a>)</p>
|
112 |
+
|
113 |
+
|
114 |
+
|
115 |
+
<!-- ROADMAP -->
|
116 |
+
## Roadmap
|
117 |
+
|
118 |
+
- [x] Add Changelog
|
119 |
+
- [x] Add main api.py file
|
120 |
+
- [ ] Add Additional Examples
|
121 |
+
- [ ] Adding secure https connection
|
122 |
+
- [ ] Adding more endpoints from OpenAI API
|
123 |
+
- [ ] v1/audio/translations
|
124 |
+
- [ ] v1/audio/transcriptions
|
125 |
+
|
126 |
+
See the [open issues](https://github.com/PantelisDeveloping/openspeech-tts/) for a full list of proposed features (and known issues).
|
127 |
+
|
128 |
+
<p align="right">(<a href="#readme-top">back to top</a>)</p>
|
129 |
+
|
130 |
+
|
131 |
+
|
132 |
+
<!-- CONTRIBUTING -->
|
133 |
+
## Contributing
|
134 |
+
|
135 |
+
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**.
|
136 |
+
|
137 |
+
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement".
|
138 |
+
Don't forget to give the project a star! Thanks again!
|
139 |
+
|
140 |
+
1. Fork the Project
|
141 |
+
2. Create your Feature Branch (`git checkout -b PantelisDeveloping/openspeech-tts`)
|
142 |
+
3. Commit your Changes (`git commit -m 'Committing changes'`)
|
143 |
+
4. Push to the Branch (`git push origin PantelisDeveloping/openspeech-tts`)
|
144 |
+
5. Open a Pull Request
|
145 |
+
|
146 |
+
<!-- LICENSE -->
|
147 |
+
## License
|
148 |
+
|
149 |
+
Distributed under the MIT License. See `LICENSE.txt` for more information.
|
150 |
+
|
151 |
+
<p align="right">(<a href="#readme-top">back to top</a>)</p>
|
152 |
+
|
153 |
+
|
154 |
+
|
155 |
+
<!-- CONTACT -->
|
156 |
+
## Contact
|
157 |
+
|
158 |
+
Pantelis
|
159 |
+
|
160 |
+
Project Link: [https://github.com/PantelisDeveloping/openspeech-tts](https://github.com/PantelisDeveloping/openspeech-tts)
|
161 |
+
|
162 |
+
<p align="right">(<a href="#readme-top">back to top</a>)</p>
|
163 |
+
---
|
164 |
+
license: apache-2.0
|
165 |
+
---
|