Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

engine.say("^") is not working #307

Closed
shiva396 opened this issue Mar 5, 2024 · 4 comments
Closed

engine.say("^") is not working #307

shiva396 opened this issue Mar 5, 2024 · 4 comments

Comments

@shiva396
Copy link

shiva396 commented Mar 5, 2024

"^" is not working with voice type 2

import pyttsx3
engine = pyttsx3.init()
engine.setProperty("rate", 100)
voices = engine.getProperty("voices")
engine.setProperty("voice", voices[1].id)
print(voices[1].id)
engine.say("^")
engine.runAndWait()

Name of the file :
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Speech\Voices\Tokens\TTS_MS_EN-US_ZIRA_11.0

@willwade
Copy link
Collaborator

Umm what were you expecting it say?

@shiva396
Copy link
Author

shiva396 commented Oct 3, 2024

Often called a “caret,” “hat,” “circumflex,” or “exponent.”...
May be the main use case could be considered. i.e., "exponent"

@willwade
Copy link
Collaborator

willwade commented Oct 3, 2024

Ok. I think you would be best defining a dict to look up what these characters should say and send them to the engine. I"d be nervous of doing this in the engine of pyttsx3 though. Each engine does things differently- particularly espeak. Infact I wouldn"t mind betting carat actually means something else dependent on the language of the voice.

In short - if it says nothing it"s probably for good reason. The underlying speech engine either understands it and it isn"t what you are expecting or it doesn"t

@shiva396
Copy link
Author

shiva396 commented Oct 6, 2024

Agreed! A dict for dialogue is safer since TTS engines handle symbols differently. For example, if you pass "2^3," the engine might not interpret it as "2 to the power of 3," and the user would expect that. My POV;

@willwade willwade closed this as not planned Won't fix, can't repro, duplicate, stale Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants