Voice Search with JavaScript (Web Speech API)

แชร์
ฝัง
  • เผยแพร่เมื่อ 10 ก.ค. 2019
  • Learn how to add Speech Recognition to your websites and web applications with JavaScript, using the Web Speech API.
    Speech recognition involves receiving speech through a device's microphone, which is then checked by a speech recognition service and a result is returned as a text string, allowing for further actions to be initiated as a result.
    Web Speech API allows for Speech Recognition in the browser, using JavaScript. This opens up many new possibilities regarding user interaction with websites and web applications.
    In this video, we use the Web Speech API in order to build a Voice Search feature. In the first few minutes, we create an HTML Google Search Form and we then proceed to exploring the Web Speech API and using JavaScript to implement the Voice Search feature!
    Enjoy 🙂
    Web Speech API: developer.mozilla.org/en-US/d...
    SpeechRecognition: developer.mozilla.org/en-US/d...
    Code for this Project: codepen.io/Coding_Journey/pen...
    Support the Channel 💙☕🙏
    PayPal: paypal.me/CodingJourney
    Suggested Videos:
    Font Awesome 5 Icons: • Font Awesome 5 Icons
    Typing Effect with HTML, CSS and JavaScript: • Typing Effect with HTM...
    Simple Auto-Playing Image Slideshow (HTML, CSS and JavaScript): • Simple Auto-Playing Im...
    Arrow Swipe Game with HTML, CSS and JavaScript: • Arrow Swipe Game with ...
    Thanks for watching! For any questions, suggestions or just to say hi, please use the comment section below!
    Codepen: codepen.io/Coding_Journey/
    Twitter: / codingjrney
    Email: codingjourney123@gmail.com
    Subscribe 💖
    / @codingjourney

ความคิดเห็น • 69

  • @James-dh6gt
    @James-dh6gt 5 ปีที่แล้ว +1

    Brilliant! Thanks mate!!!

  • @osmangoni2376
    @osmangoni2376 5 ปีที่แล้ว +1

    awesome and great tutorial.

  • @bitcollector6285
    @bitcollector6285 ปีที่แล้ว +1

    Thank you very much!
    Ευχαριστώ! Μου 'φτιαξες τη μέρα :)

    • @CodingJourney
      @CodingJourney  ปีที่แล้ว

      Oooh my pleasure 🙂 Heheh! Τέλεια!!! 💙💙

  • @codemonkey7914
    @codemonkey7914 5 ปีที่แล้ว +1

    Thank you so much for this

  • @MentalPowerYoutube
    @MentalPowerYoutube 4 ปีที่แล้ว +1

    I am searchin for it! Thanks so much It worked

    • @CodingJourney
      @CodingJourney  4 ปีที่แล้ว

      Amazing! Very glad it helped 🙂

  • @marioalfredojorge1204
    @marioalfredojorge1204 3 ปีที่แล้ว +1

    That was awesome, thank man!

    • @CodingJourney
      @CodingJourney  3 ปีที่แล้ว +1

      Amazing, glad you liked it 🙂💙

  • @warriors_1000
    @warriors_1000 3 ปีที่แล้ว +1

    it is awesome it really works

  • @kaustubhbadve5509
    @kaustubhbadve5509 2 ปีที่แล้ว +1

    Thanks it helps alot

  • @BudiSantoso-er6cq
    @BudiSantoso-er6cq 4 ปีที่แล้ว +2

    Thank you sir, God bless u..

    • @CodingJourney
      @CodingJourney  4 ปีที่แล้ว +2

      Very glad you liked it 🙂 Thanks for the lovely message!! 🙏

  • @sukhwarring
    @sukhwarring 4 ปีที่แล้ว +2

    perfect representation of topic it help me a lot in my project thank you very much

    • @CodingJourney
      @CodingJourney  4 ปีที่แล้ว

      Amazing! Very very glad to hear that 🙂

    • @sukhwarring
      @sukhwarring 4 ปีที่แล้ว

      @@CodingJourney i have question related to this can we store input and output file in any database like mangodb or anyother . after that we can compare it like what i told and what my program write
      i want to create use it in translation service so want to fatch my data so for that i want to store my input (may be as a wave or mp3 format )and output simple file
      if you have any idea or suggestion please rply
      Thanks in advance

  • @shaiksayyadbabasharief8502
    @shaiksayyadbabasharief8502 2 ปีที่แล้ว

    Great presentation, Could you please let me know how we can make this work in conjunction with md-autocomplete option ?

  • @HelderMachava
    @HelderMachava 9 หลายเดือนก่อน +1

    Thnk u so much, helped me alot

    • @CodingJourney
      @CodingJourney  8 หลายเดือนก่อน

      Superb! My pleasure 💙💙

  • @mparikshit
    @mparikshit 2 ปีที่แล้ว +1

    Super cool, thank you Guruji.

  • @tadhailu
    @tadhailu 3 ปีที่แล้ว +1

    Job well executed !

  • @sudipaghosh591
    @sudipaghosh591 3 ปีที่แล้ว +1

    Awesome (from India)

  • @MB-gf6zd
    @MB-gf6zd 4 ปีที่แล้ว +1

    Eccelent and well explained

    • @CodingJourney
      @CodingJourney  4 ปีที่แล้ว

      Thanks for the nice words!! Keep coding 🙂

  • @peterkim9696
    @peterkim9696 5 ปีที่แล้ว +1

    How we can get audio file source to convert it to text without download it

  • @TylerPotts
    @TylerPotts 4 ปีที่แล้ว +1

    Great video!! :D

    • @CodingJourney
      @CodingJourney  4 ปีที่แล้ว +1

      Thanks Tyler!! 💙🙏🙂

  • @sirlancelot8015
    @sirlancelot8015 5 ปีที่แล้ว +1

    Good one Sir!

  • @andriikhomenko4061
    @andriikhomenko4061 2 ปีที่แล้ว +2

    Greetings from Ukraine! Thank you for the good work :)

    • @CodingJourney
      @CodingJourney  2 ปีที่แล้ว

      Oh thank you 🙂 warm greetings to Ukraine 💙💙

  • @IrfanKhan-sf8nn
    @IrfanKhan-sf8nn 3 ปีที่แล้ว +1

    nice. Thanks a lot

    • @CodingJourney
      @CodingJourney  3 ปีที่แล้ว

      My pleasure, very glad you liked it!! 💙

  • @princepatwa2368
    @princepatwa2368 4 ปีที่แล้ว +1

    How to run this code on http because chrome does not allow please provide solution

  • @sukhwarring
    @sukhwarring 3 ปีที่แล้ว

    i want all result for example if i say anything it remove last result and display new one but i want all result in serch box untill i stop speech recognition
    please give me some suggestion

  • @ronnielarr1325
    @ronnielarr1325 3 ปีที่แล้ว +1

    Bravo Griego! Added it to my site autocomplete suggest search and works like a charm! Thank you! A siri like sound wave below the bar, while mic is on, would be ultimate. Any ideas where to start?

    • @CodingJourney
      @CodingJourney  3 ปีที่แล้ว

      Heh 😉 Thanks man, very glad you found this useful! Sorry for the late reply btw and I hope that by now you've figured it out because what you are asking is quite complicated and requires some research! There are libraries for this, which might be helpful e.g. the SiriWave(JS): github.com/kopiro/siriwave and here's an example I found after a quick search: siriwavejs.herokuapp.com/ (I think if you inspect the code of this one might help you connect the pieces). Now, if you want to create the audio visualizer from scratch, feel free to do your research and end up with the solution which makes more sense to you!! All the best!!! 💙

  • @ziuhoque1532
    @ziuhoque1532 5 ปีที่แล้ว

    awesome video sir
    please make this type more video
    please

    • @CodingJourney
      @CodingJourney  5 ปีที่แล้ว

      Thank you! Glad you liked it!! Welcome aboard 🙂

  • @webd5300
    @webd5300 4 ปีที่แล้ว +1

    In my script onerror function return network

  • @jungamaroli8567
    @jungamaroli8567 3 ปีที่แล้ว

    can i change the speech.lang to another language?

  • @user-hd3pz2ow1b
    @user-hd3pz2ow1b 5 หลายเดือนก่อน

    nice

  • @darshang3157
    @darshang3157 4 ปีที่แล้ว +1

    Hi,
    After giving the code for html as you have done. I am not able to get the voice symbol when it is run live server

    • @CodingJourney
      @CodingJourney  4 ปีที่แล้ว

      Hey, what's up man! In the description you can find a link to the finished project. So you can try opening it and if you can't see the microphone icon then it is a browser support issue. If you can see it then you can compare the finished project's code with yours and figure out the problem. All the best! Keep coding 🙂

  • @ashwinin1705
    @ashwinin1705 2 ปีที่แล้ว

    sir i have executed the program but the voice search is not working i have to type them manually thn its working pls help ...

  • @AJAYSINGH-yg8re
    @AJAYSINGH-yg8re 2 ปีที่แล้ว

    sir in the google search the mic is not showing and not working to search please help

  • @TechWiBi
    @TechWiBi 3 ปีที่แล้ว +1

    great work

    • @CodingJourney
      @CodingJourney  3 ปีที่แล้ว

      Oh thank you! 🙂 Very glad you liked it!!

    • @TechWiBi
      @TechWiBi 3 ปีที่แล้ว +1

      @@CodingJourney wlc

  • @anthonyarmour1812
    @anthonyarmour1812 2 ปีที่แล้ว

    Thank you, absolutely great tutorial! Does anyone know if this API has a request limit?

    • @nicole810
      @nicole810 2 ปีที่แล้ว

      Tengo la misma pregunta

  • @itjobs5648
    @itjobs5648 3 ปีที่แล้ว

    Hi,
    did anyone use this Web Speech API to fill out a form fields via voice?
    Any hints?

    • @mohammadhusain3764
      @mohammadhusain3764 2 ปีที่แล้ว

      th-cam.com/video/5HAF0m2nUQA/w-d-xo.html
      It might be helpful

  • @rajataudichya895
    @rajataudichya895 4 ปีที่แล้ว +1

    how can I use this to type a document? Can you please help me or make a video on that

    • @CodingJourney
      @CodingJourney  4 ปีที่แล้ว +2

      Hey man! I think after watching this video you should be able to implement what you want. Unfortunately I don't have the time to create a separate project for every specific request 🙁 Here's a link with Web Speech API demonstration on speech to text. Check whether you are satisfied with the accuracy!
      www.google.com/intl/en/chrome/demos/speech.html
      All the best, keep coding! 🙂

  • @pouriyanourouznejad7090
    @pouriyanourouznejad7090 3 ปีที่แล้ว

    So it cant work offline, right?
    I made this and it didnt work in my pc offline
    But it works offline in my Android phone! Why?
    Whats goin' on?
    Is there specific thing in my Android phone's Local storage??? Can it add to Windows to work offline???
    I have many questions!!! Help!!!
    I also made this thing and then uploaded to a free host (my website) but it didnt work!!!
    It just works online in local storage!
    Its not work over the Internet for me
    Why?
    Pls answer to all my questions
    Tnx

  • @Chess_G_Chess
    @Chess_G_Chess 2 ปีที่แล้ว

    Brilliant work.
    One small doubt, what if I want to search a html file in my directories.

    • @hasanjaved7772
      @hasanjaved7772 2 ปีที่แล้ว

      same question..please answer if u solved this

  • @musabhaji3436
    @musabhaji3436 5 ปีที่แล้ว

    thanks for this amazing video
    my browser is chrome and its not working and says in console.log ( Uncaught TypeError: Cannot read property 'querySelector' of null)
    please help me to solve this problem

    • @CodingJourney
      @CodingJourney  5 ปีที่แล้ว

      Hey thanks, glad you liked it! It is very difficult to debug without looking at the code, however this error implies that you are trying to access a null object. Make sure there isn't any typing error and also note that:
      const searchForm = document.querySelector("#search-form");
      const searchFormInput = searchForm.querySelector("input"); // document.querySelector("#search-form input");
      Also make sure that you include the at the end of the or in the using the "defer" attribute in order to ensure that DOM content has been loaded before trying to access it!
      You can also find a link to the code for this project in the description. Good luck!!

    • @musabhaji3436
      @musabhaji3436 5 ปีที่แล้ว

      thank you so much for your help, please make next tutorial for voice assistance have custom response like these videos ( th-cam.com/video/gnz9X3SSQyY/w-d-xo.html ), ( th-cam.com/video/JIrSueiHXcs/w-d-xo.html ) I like your explanation, i hope you will make as soon as possible

  • @uitech1704
    @uitech1704 3 ปีที่แล้ว

    If two persons are there , can it recognise the person who is speaking ?

    • @CodingJourney
      @CodingJourney  3 ปีที่แล้ว

      Hi! I think, up to this point, Web Speech API is trying to recognize what is being said (the words) and not who is saying it.

  • @jdujdjruxjJeujdj
    @jdujdjruxjJeujdj 4 ปีที่แล้ว +1

    Gujarati will understand the early song

  • @karamveersachdeva935
    @karamveersachdeva935 3 ปีที่แล้ว +1

    Awesome but it is difficult

    • @CodingJourney
      @CodingJourney  3 ปีที่แล้ว

      Thanks mate! I agree but practice makes it easier 🙂 All the best, keep coding!!