Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
m0rniac committed Jul 17, 2023
0 parents commit 917cc9b
Show file tree
Hide file tree
Showing 19 changed files with 10,031 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Auto detect text files and perform LF normalization
* text=auto
21 changes: 21 additions & 0 deletions LICENSE
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.
84 changes: 84 additions & 0 deletions README.md
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/)
Loading

0 comments on commit 917cc9b

Please sign in to comment.