-
Notifications
You must be signed in to change notification settings - Fork 1
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
refactor speak.js
to allow pre-loaded voices.
#7
Conversation
…e global variables.
… to `assets/voices`.
I have identified that the problem reported in the issue #6 is due to the fact that the dialogue text font size uses the `vw` unit. This make it look small in small screen and look large in large screen size as well. Marked for further refactor.
Some of the audio files have not been included because they overlap itself when playing, causing a loud noise: , and .
I added a function to avoid the audio to overlap each other.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Previously, the code was giving the warning 'The AudioContext was not allowed to start'. This commit fixes this issue and adds the @async flag to all the async functions.
Thanks for doing this! I didn't focus on writing clean code much; I made this project in ~5 hours as a part of a hackathon where the main theme was to create projects that have no value whatsoever. (I'll need to add this in the
Yes, I should have let you know about them earlier - the audio files aren't clipped yet. |
I have changed |
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.
Looks good to me! Thanks for the the work here!
Hello, @burntcarrot. I have refactored the
speak.js
file, now renamed toscript.js
. The changes I have done:1.5rem
and controlling overflow with theoverflow
rule.selector
with some of the options of pre-loaded audio I have found atassets/voice
, now renamed toassets/voices
. Three of the voices:moo.mp3
,santa.wav
andwoof.mp3
were long, causing the audio to overlap each other, making too much noise. For this reason, I have not used them.I hope these changes help you.