Billgonzo123 / Spelling-Bee

A spelling quiz that uses a voice-to-text API to read and describe words! Test you spelling skills!
https://chriskurz098.github.io/Spelling-Bee/
0 stars 1 forks source link

added init code and main code function. Also added some animations for fun #22

Closed Billgonzo123 closed 2 years ago

Billgonzo123 commented 2 years ago

So heres what I added:

  1. On page load, all the screens are hidden except for the start screen
  2. When the start button is clicked, it runs the "main()" function
  3. In this function, it first calls the fetch function and puts the results into a variable called "wordData"
  4. "wordData" can be used to get the word, definition and example sentence [ ie, wordData.example ]
  5. I also updated and added the function that plays the TTS audio and removed the script for the TTS because I found a way better way of doing it that doesn't require it.
  6. This function is called "playVoice()" and you send the sentence to that function [ ie, playVoice(sentence); ]
  7. Then I added a couple temporary animations just cuz they are easy to make