-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtesting.py
More file actions
26 lines (20 loc) · 732 Bytes
/
testing.py
File metadata and controls
26 lines (20 loc) · 732 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import asyncio
from rspeechpy import Engine
# Declaration
speech = Engine()
async def example():
""" Look all avaible voices """
#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.
""" Settings to build a synth of realist voice """
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())