Skip to content

Commit

Permalink
f
Browse files Browse the repository at this point in the history
  • Loading branch information
carsonmulligan committed Sep 26, 2024
1 parent 8c1f4bf commit 51dd108
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions voiceCheck.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import pyttsx3

engine = pyttsx3.init()
voices = engine.getProperty('voices')

# for voice in voices:
# print(f"Voice ID: {voice.id}, Name: {voice.name}, Languages: {voice.languages}")


# # Voice ID: com.apple.eloquence.es-MX.Grandma, Name: Grandma (Spanish (Mexico)), Languages: ['es_MX']
# # Voice ID: com.apple.eloquence.es-MX.Grandpa, Name: Grandpa (Spanish (Mexico)), Languages: ['es_MX']
# ... existing code ...

# Set the voice to Grandpa
for voice in voices:
if voice.id == "com.apple.eloquence.es-MX.Shelley":
engine.setProperty('voice', voice.id)
break

# Test the voice
engine.say("Hola, soy el abuelo.")
engine.runAndWait()

# ... existing code ...

0 comments on commit 51dd108

Please sign in to comment.