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

Factor out most of the say function to utils/speechSynthesis.ts #196

Merged

Conversation

evgenyfadeev
Copy link
Contributor

@evgenyfadeev evgenyfadeev commented Nov 10, 2024

partially addresses #168

it helped to do a few steps before getting to the useLesson hook

 - does not pass stenohintsonthefly to child components - it is used from globalUserSettings jotai state
* src/AppRoutes.tsx:
 - removes stenohintsonthefly prop
 - removes unused stenohintsonthefly prop from Flashcards and StenoDictionary components
AppRoutes.tsx - removes own prop stenohintsonthefy
  - factors out most part of the say method into a utils/speechSynthesis.ts
  - leaves App.this.say method with only the call to synthesizeSpeech with the custom parameters
  - moves the synth and voices variables to the utils/speechSynthesis.ts
* utils/speechSynthesis.ts
  - exports the synth variable and synthesizeSpeech function
  - factors out some local functions for use in the synthesizeSpeech function
@evgenyfadeev evgenyfadeev mentioned this pull request Nov 11, 2024
@didoesdigital didoesdigital merged commit 17a9666 into didoesdigital:master Nov 11, 2024
@didoesdigital
Copy link
Owner

Thanks @evgenyfadeev ! I added a couple of commits to remove redundant JSDocs that now use TypeScript types and fix a typo in a variable name, which I spotted because VS Code's Code Spell Checker extension by Street Side Software pointed it out. It's now deployed!

@evgenyfadeev
Copy link
Contributor Author

Nice, thanks @didoesdigital I'll get this extension too!

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