Python Voice Assistant Tutorial #9 – Waking the Assistant

///Python Voice Assistant Tutorial #9 – Waking the Assistant

Python Voice Assistant Tutorial #9 – Waking the Assistant

FavoriteLoadingAdd to favorites

In this python voice assistant tutorial I will cover how we can create a wake keyword for our assistant. This word will allow us to trigger the assistant. Something like “hey tim”.

Text-Based Tutorial:

*****
Enroll in The Fundamentals of Programming w/ Python

Instagram:
Website
Twitter:
Discord:
GitHub:
Podcast:

One-Time Donations:
Patreon:
****

Please leave a LIKE and SUBSCRIBE for more content!

Tags:
– Tech With Tim
– Python Tutorials
– Python voice assistant tutorial
– Python voice assistant
– Voice Assistant Python

#Python

source

By |2019-10-11T23:19:19+00:00October 11th, 2019|Python Video Tutorials|21 Comments

21 Comments

  1. m 2222 October 11, 2019 at 11:19 pm - Reply

    I recommend using pyttsx3 library for offline text to speech feature. Link: https://pypi.org/project/pyttsx3/2.5/
    example:
    import pyttsx3 as t2s

    eng=t2s.init()
    def speak(text):
    try:
    eng.setProperty('rate',120);eng.setProperty('volume',.9)
    eng.say(text)
    eng.runAndWait()
    except:
    pass

  2. Crazzie Gamer October 11, 2019 at 11:19 pm - Reply

    is there anyway to create a shutdown command which will stop the program listening/running

  3. Gökhan Tekir October 11, 2019 at 11:19 pm - Reply

    when the program needs to play the voice.mp3 second time, it gives permission denied voice.mp3 error. can anyone help me pls

  4. Gautam Sharma October 11, 2019 at 11:19 pm - Reply

    @Tech With Tim is there any way to access the same script from smart phone or remotely access the program?

  5. Cash Hawker October 11, 2019 at 11:19 pm - Reply

    Use Machine Learning to make the voice sound more realistic. You can program the assistant to watch a lot of movies and TV shows overtime using machine learning to learn the different pitches of certain words and stuff like that.

  6. Mahir Yıldızhan October 11, 2019 at 11:19 pm - Reply

    Hi Tim,
    I tried to add a break to while to close but it's not working. It's only breaking for. Could you please help me about it too. Thanks.
    while True:
        print("Listening")
        text = get_audio()
        
        if text.count(WAKE) > 0:
            speak("I am ready")
            text = get_audio()

            CALENDAR_STRS = ["what do i have", "is there anything", "do i have plans", "am i busy"]
            for phrase in CALENDAR_STRS:
                if phrase in text:
                    date = get_date(text)
                    if date:
                        get_events(date, SERVICE)
                    else:
                        speak("I don't understand")

            NOTE_STRS = ["make a note", "take a note", "write this down", "remember this"]
            for phrase in NOTE_STRS:
                if phrase in text:
                    speak("What would you like me to write down?")
                    note_text = get_audio()
                    note(note_text)
                    speak("I've made a note of that.")

            QUIT_STRS = ["bye bye", "close program", "quit"]
            for phrase in QUIT_STRS:
                if phrase in text:
                    break

  7. akash pawar October 11, 2019 at 11:19 pm - Reply

    Can we make jarvis with help of google assistant and with a.i

  8. technoinfo worldwide October 11, 2019 at 11:19 pm - Reply

    Implement on UI design too

  9. Viper Ultra October 11, 2019 at 11:19 pm - Reply

    Thanks for video bro 👊

  10. Sa Inco October 11, 2019 at 11:19 pm - Reply

    thanks.

  11. Ole Gruetz October 11, 2019 at 11:19 pm - Reply

    You could create a separate audio file (e.g. hey_tim.mp3) which is played every time the wakeword is detected.
    That would speed up the wakeword detection because the program wouldn't have to create a new file every time.

  12. Dor Sloim October 11, 2019 at 11:19 pm - Reply

    Could not find this repo on your github, is there a way i can clone this project?
    Thanks in advanced.

  13. Markus Buchholz October 11, 2019 at 11:19 pm - Reply

    The whole of your content (this series and the previous) is state-of-the-art. I believe that you inspire thousands of enthusiast who follow you on YouTube. The content is all the time up to date and clearly displayed. Beside your remarkable and outstanding work on YouTube channel I hope that you will complete your study on time.   

    Analyzing the popularity of your videos ,  it seems that the most popular are projects and videos where you solve the problems. It is extremely interesting to use our brains more often and presents SW from this approach (as an amazing  tool to solve the challenges). 

    Regarding this series it can be probably good idea to control HW by voice. You can deploy SW on Raspberry PI or the other microcontroller). The script can be pretty easy but very practical in order to build intelligent house.
    Thanks you again and good luck!

  14. Hemanth Kotagiri October 11, 2019 at 11:19 pm - Reply

    In the next video, we wanna see if the assistant captured the entire thing you said at the end. 😛

  15. Alphabet Corp October 11, 2019 at 11:19 pm - Reply

    <*>

  16. Pushpajit Biswas October 11, 2019 at 11:19 pm - Reply

    After 4 or 5 times it takes too long time, how can I fix this issue to enhance the performance, by the way Awsome video

  17. Lightning Technologie October 11, 2019 at 11:19 pm - Reply

    Amazing ❤

  18. Meridian October 11, 2019 at 11:19 pm - Reply

    Thanks for implementing my suggestion 😀 I feel honored.

  19. HackNetAyush October 11, 2019 at 11:19 pm - Reply

    Nice….

  20. Aryan Bhatia October 11, 2019 at 11:19 pm - Reply

    Amazing

  21. Sharath October 11, 2019 at 11:19 pm - Reply

    👍👍👍

Leave A Comment

*