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

DRAFT: attempt to fix hang on voices for espeak in test #386

Closed
wants to merge 6 commits into from

Conversation

willwade
Copy link
Collaborator

@cclauss take a look - i think this fixes this hang on windows.. but maybe ive refactored too much

@willwade
Copy link
Collaborator Author

nb that assertion on length is the expected number of voices. Im nervous about that - maybe it should just be

assert len(voices) > 10, f"Expected more than 10 voices in {engine}, but found {len(voices)}"

tests/test_engines.py Outdated Show resolved Hide resolved
tests/test_engines.py Outdated Show resolved Hide resolved
names = []
for _voice in english_voices:
engine.setProperty("voice", _voice.id)
# English (America, New York City) --> America, New York City
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is much better documentation of what the code does than ~ Extract hame for display.

Comment on lines -76 to -77
engine.runAndWait()
engine.setProperty("voice", voice) # Reset voice to original value
Copy link
Contributor

@cclauss cclauss Nov 14, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Listen to the tests that come after this one to see why restoring defaults makes things sound more intuitive.

Perhaps we need a test that is.

  1. Start engine.
  2. Change voice.
  3. Stop engine.
  4. Start engine.
  5. Test if the voice is the default voice or the changed voice.

kip the test if no other voices are available. Use a loop to select a different voice, ensuring a valid change.. Add debug
@willwade willwade changed the title attempt to fix hang on voices for espeak in test DRAFT: attempt to fix hang on voices for espeak in test Nov 15, 2024
@willwade
Copy link
Collaborator Author

NB: IT seems we have a problem in espeak set voice..

Copy link
Contributor

@cclauss cclauss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

@willwade willwade closed this Nov 15, 2024
@cclauss
Copy link
Contributor

cclauss commented Nov 15, 2024

?

We need to get the Windows tests passing soon.

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

Successfully merging this pull request may close these issues.

2 participants