Skip to content

📋 speech recognition using javascript, part of Javascript30 Youtube series by Wes Bos

Notifications You must be signed in to change notification settings

AndrewJBateman/javascript-speech-recognition

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

⚡ Javascript Speach Recognition

GitHub repo size GitHub pull requests GitHub Repo stars GitHub last commit

📄 Table of contents

📚 General info

  • Tutorial Code for speach recognition using Javascript, part of Javascript30 Youtube series by Wes Bos.

📷 Screenshots

Example screenshot.

📶 Technologies

💾 Setup

  • To install 'browser-sync' dependencies, type 'npm i'.
  • To run app type 'npm run start' then click on HTML file manager that appears - http://localhost:3000/index.html.

💻 Code Examples

  • speach recognition function to convert speach to paragraphs.
  recognition.addEventListener('result', e => {
    const transcript = Array.from(e.results) // convert to array.
      .map(result => result[0])
      .map(result => result.transcript)
      .join(''); // join strings

      // create paragraph for each body of speach.
      p.textContent = transcript;
      if (e.results[0].isFinal) {
        p = document.createElement('p');
        words.appendChild(p);
      }
      if(transcript.includes('say the date' || 'the date')) {
        console.log(Date.now())
      }

      if(transcript.includes('unicorn')) {
        console.log('🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄')
      }

      console.log(transcript);
  });

🆒 Features

  • Functions can be added that are triggered by certain words or phrases, such as 'get the weather'.

📋 Status & To-Do List

  • Status: Working.
  • To-Do: Nothing.

👏 Inspiration

📁 License

  • N/A

✉️ Contact

About

📋 speech recognition using javascript, part of Javascript30 Youtube series by Wes Bos

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published