thevickypedia / Jarvis

Fully Functional Voice Based Natural Language UI
https://jarvis-health.vigneshrao.com
MIT License
209 stars 41 forks source link

Is possible create something in Spanish? #17

Closed johnfelipe closed 3 years ago

johnfelipe commented 3 years ago

Can u help me for do it this in local windows?

thevickypedia commented 3 years ago

Although pyttsx3 module has multiple languages, it depends on what your system configuration is. I'd recommend running the following piece of code to determine if pyttsx3 and your machine supports Spanish.

from pyttsx3 import init
from sys import stdout
speaker = init()
voices = speaker.getProperty("voices")
# noinspection PyTypeChecker
print(f'Available voices: {len(voices)}')
# noinspection PyTypeChecker
for num in range(len(voices)):
    # noinspection PyUnresolvedReferences
    speaker.setProperty("voice", voices[num].id)
    stdout.write(f'\rTesting my voice module number: {num}')
    speaker.say(f'Testing my voice module number: {num}')
    speaker.runAndWait()