-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 917cc9b
Showing
19 changed files
with
10,031 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Auto detect text files and perform LF normalization | ||
* text=auto |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2023 m0rniac | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
|
||
# PSpeechPy | ||
|
||
A Text To Speech engine with realistic voices developed entirely in Python and powered by Microsoft Azure as Python Package | ||
|
||
### Based: | ||
|
||
- [SNARF's Engine](https://github.com/m0rniac/snarf) | ||
|
||
|
||
## Installation (Python 3.X+) | ||
- Linux: | ||
```bash | ||
pip3 install rspeechpy | ||
``` | ||
- Windows: | ||
```bash | ||
pip install rspeechpy | ||
``` | ||
### Usage & Examples (Scripts) | ||
|
||
- List all avaible voices: | ||
```python | ||
import asyncio | ||
from rspeechpy import Engine | ||
|
||
# Declaration | ||
speech = Engine() | ||
|
||
async def example(): | ||
names = await speech.giveVoicesList() | ||
for name in names: | ||
print(name['FriendlyName']) # Describe voice's name & language. | ||
print(name['ShortName']) # Return "key" to use that voice. | ||
|
||
# Running | ||
app = asyncio.get_event_loop() | ||
app.run_until_complete(example()) | ||
``` | ||
|
||
- Create a synthesize from text (Generate .mp3 audio): | ||
```python | ||
import asyncio | ||
from rspeechpy import Engine | ||
|
||
# Declaration | ||
speech = Engine() | ||
|
||
async def example(): | ||
await speech.setVoice('es-ES-ElviraNeural') | ||
|
||
await speech.setRate(5) | ||
await speech.setPitch(5) | ||
await speech.setVolume(5) | ||
|
||
text = "Hola esto es una prueba de texto a voz" | ||
await speech.synthesize(text, 'audio.mp3') | ||
|
||
# Running | ||
app = asyncio.get_event_loop() | ||
app.run_until_complete(example()) | ||
``` | ||
|
||
|
||
|
||
## API Reference | ||
|
||
#### from Microsoft Azure: | ||
|
||
[More documentation](https://learn.microsoft.com/en-us/azure/cognitive-services/speech-service/language-support?tabs=stt#text-to-speech) | ||
|
||
| Parameter | Type | Description | | ||
| :-------- | :------- | :------------------------- | | ||
| `api_key` | `string` | *Non-Required* | | ||
|
||
|
||
|
||
## License: | ||
|
||
[MIT License](https://choosealicense.com/licenses/mit/) | ||
|
||
|
||
#### 🔗 Sponsoring: | ||
[![portfolio](https://img.shields.io/badge/buy_me_a_coffee-000?style=for-the-badge&logo=ko-fi&logoColor=white)](https://www.paypal.com/paypalme/christcastr/) |
Oops, something went wrong.