-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add intervals for enhanced natural speech (#9)
* feat: add random intervals to timeouts. I add a function to generate random timeouts for the execution of the speak function. This adds a more natural speech as was intended by the issue #8. * refactor: reorganize code by using functions. * refactor: change to number. * fix: write to dialogueText now matches the speak timeout. * feat: add extra treatment to remove extra white spaces. * docs: update some of the JSDocs to match new functions. * refactor: separate white space treatments to its own function. * refactor: make random intervals relative to interval chosen. Now, all the random intervals are inversely proportional to the interval chosen. Which means: + if the interval chosen is low, the random interval is high. + if the interval chosen is high, the random interval is low. This makes the voices more natural. * refactor: remove unecessary console.log. * fix: make only one audio context available for the code. * refactor: follow suggestions for refactoring.
- Loading branch information
Sherman Rofeman
authored
Jan 8, 2023
1 parent
d3f9f33
commit b3c9a75
Showing
2 changed files
with
116 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
b3c9a75
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
quackspeak – ./
quackspeak.vercel.app
quackspeak-burntcarrot.vercel.app
quackspeak-git-main-burntcarrot.vercel.app