Hands-on Tutorial: Build a Google Gemini-Powered Voice Assistant on Raspberry Pi

Поделиться
HTML-код
  • Опубликовано: 21 ноя 2024

Комментарии • 92

  • @jan3019
    @jan3019 3 дня назад

    subscribed! i love this kind of projects! thanks for sharing! i wonder if you can also add those tiny black and white oled display to display the text that you're asking and the Ai's answer.

    • @TechMakerAI
      @TechMakerAI  3 дня назад +1

      Glad to hear that. Thanks for your feedback! Yes, it is possible to add an OLED display to show the text. That will be the topic of another video.

  • @estugit
    @estugit 2 месяца назад +2

    I've watched almost all of your videos, great work! Please make more useful videos.

  • @videoserver1
    @videoserver1 19 дней назад +1

    Good video and explained well! Will try with my Pi 4 B.

    • @TechMakerAI
      @TechMakerAI  18 дней назад

      Thank you for your feedback! Good luck and have fun!

  • @pixyful7025
    @pixyful7025 2 месяца назад +2

    hey !
    already thank you for sharing a file that really works 😀👍
    I try to launch your python script at raspberry startup but impossible to start it with the virtual environment. I have an error message "import google.generativeai as genai" except if I enter the line manually everything works do you have any idea how to do it?

    • @TechMakerAI
      @TechMakerAI  2 месяца назад +2

      Hi, @pixyful7025, I am glad it is working. It is possible to automatically launch this Python program at the startup of RPi. I have a video on this topic coming up very soon. Please subscribe to my channel as you will be notified when it is out.

    • @pixyful7025
      @pixyful7025 2 месяца назад +1

      ​@@TechMakerAI I found a little thing that seems to work by tinkering. I wrote it in .bashrc and told the raspberry to log in automatically

    • @pixyful7025
      @pixyful7025 2 месяца назад +1

      @@TechMakerAI I will wait for your video to compare the most optimized 😉

  • @mukagedek4010
    @mukagedek4010 Месяц назад

    hey, thanks for the video. I just want to start project exactly the same with yours, mine is kind a companion robot. but the question is, is the service from google just like gemini ai or TTS are completely free? or there's additional cost for that?

    • @TechMakerAI
      @TechMakerAI  Месяц назад

      @mukagedek4010: The Google Gemini API and Google TTS are currently free to use. The TTS will most likely be free in the future too. However, it is hard to say about the Google Gemini API. Given that the ChatGPT API is not free, Google may charge a fee in the future for Gemini or they may offer a limited version for free. Anyhow, I would say go ahead and build it. There will be some free options available. Even if Google charges a fee, I think it is still worth it. By the way, in this channel, we are also building companion robots. Please subscribe as you will see in future videos.

  • @neethumohan1352
    @neethumohan1352 15 дней назад +1

    Hi
    This project worked for me. Is it possible to reduce the response delay ??

    • @TechMakerAI
      @TechMakerAI  14 дней назад

      I have optimized the code to run on multiple cores so that it will have less delay. To further improve the performance, you can add a fan to your Pi to make sure it is running at its best condition. Also, a fast wifi connection will also help.

  • @MrBluedrive
    @MrBluedrive 2 месяца назад

    can you also make a tutorial to work with a bluetooth speaker and without the leds.
    or wouldnt it work that way?

    • @TechMakerAI
      @TechMakerAI  2 месяца назад

      Yes, it will work with a Bluetooth speaker and without LEDs. I have used the Bluetooth speaker before, see this video ruclips.net/video/nHpJaE559r4/видео.html. But it requires me to run some commands to pair the Raspberry Pi with the Bluetooth speaker each time. So I switched to wired speaker after that.

  • @GauravPotbhare
    @GauravPotbhare Месяц назад

    Sir please make more tutorials on raspberry pi and Arduino

    • @TechMakerAI
      @TechMakerAI  Месяц назад

      Sure, I have new videos about Raspberry Pi, Arduino, and STM32 coming up soon.

    • @GauravPotbhare
      @GauravPotbhare Месяц назад

      @@TechMakerAI sir could you make full tutorial on Open cv because I need use on my project but still I don't know how to use on project and also make tutorial on how to install open cv on raspberry pi it's most important part sir please try to make as soon as possible I'm waiting sir

  • @Yelibots
    @Yelibots 24 дня назад

    are there any other microphone modules that work with gpio pins with rp4 and other audio amplifiers that can communicate with the pins without having to attach audio cables

    • @TechMakerAI
      @TechMakerAI  24 дня назад

      It is not easy to acquire audio input via GPIO pins. You probably need to purchase extra components for that. It is a little better for audio output, see here raspberrypi.stackexchange.com/questions/49600/how-to-output-audio-signals-through-gpio. The easiest way is to work with USB speaker and microphone.

  • @-IramNishat_2010
    @-IramNishat_2010 9 дней назад

    Hey
    (Pi 4 case with cooling fan and heatsink) where is this used in the video?

    • @TechMakerAI
      @TechMakerAI  9 дней назад

      It is not used in the demonstration, but for long-term use, you need them to keep the RRi cool. If RPi gets hot, it will show more delay when responding to your questions.

    • @-IramNishat_2010
      @-IramNishat_2010 8 дней назад

      @@TechMakerAI oh okay got it! and also is there any alternate for the audio amplifier?

    • @TechMakerAI
      @TechMakerAI  8 дней назад

      @@-IramNishat_2010 Yes, you can also use a USB speaker

  • @haribabualapati8780
    @haribabualapati8780 Месяц назад

    Sir please guide me how to get the updated data after the cut off date and time.

    • @TechMakerAI
      @TechMakerAI  Месяц назад

      This is a limitation of the large language model. The dataset used to train the large language model always has a cut-off date and time. You can try to use a newer model. It will have a newer cut-off date and time.

  • @WaterfrontConcerts
    @WaterfrontConcerts 20 дней назад

    Would this work on an ESP32 S3 chip board? or perhaps two of them togehter connected via uart? for tts/stt.. ? which version of the pi is the lowest one (cheapest) that would work for this.?

    • @TechMakerAI
      @TechMakerAI  18 дней назад

      I am not sure about the ESP32 S3 board. In this video, I used Pi 4 model B 2GB. I think 1 GB version may work too.

  • @charanartsandexperiments
    @charanartsandexperiments 9 дней назад

    is there any way to communicate with you

    • @TechMakerAI
      @TechMakerAI  8 дней назад

      Yes, you can find my email address on my RUclips channel page at: www.youtube.com/@TechMakerAI

  • @Yelibots
    @Yelibots 24 дня назад

    Any decent touch displays that can work with rp4 that communicate with gpio pins for animations?

    • @TechMakerAI
      @TechMakerAI  16 дней назад

      Have you checked on Amazon? Will this work for you: amzn.to/4hD0JmC

  • @HananPHashim
    @HananPHashim Месяц назад

    Hi sir ,
    How to get live feed like time , weather etc in gemini ai

    • @TechMakerAI
      @TechMakerAI  Месяц назад

      I do not think you can get the live feed from Google Gemini, because the Gemini model was trained by using a data set that was collected before a cut-off date and time. So it does not have the live information we have today. However, you can get live time information from RPi and the weather information from internet. I will add those to a new version of the Python code.

  • @arunpanangad
    @arunpanangad 26 дней назад

    Is sound amplifier really needed?

    • @TechMakerAI
      @TechMakerAI  26 дней назад

      It is needed if you use a passive speaker like in the video. However, if you use a USB speaker, then it is not needed.

    • @Muhammedmishal1515
      @Muhammedmishal1515 15 дней назад

      Hi sir me and this person is working on same project same class

  • @Leith79
    @Leith79 Месяц назад

    I am working on a python jarvis project and i want it to work with a raspberry pi zero 2w because of the small formfactor do you think this is possible?

    • @TechMakerAI
      @TechMakerAI  Месяц назад

      It may work, but you will experience a delay in the response

    • @Leith79
      @Leith79 Месяц назад

      @@TechMakerAI yeah thats what i thought i will probably Switch to a better Raspberry pi

    • @Leith79
      @Leith79 Месяц назад

      @@TechMakerAI thank you though

    • @TechMakerAI
      @TechMakerAI  Месяц назад

      @Leith79: it will be a good idea if you switch to a better RPi. But if you manage to make it work on Pi zero 2 W, please let us know too.

  • @xpectz
    @xpectz 2 месяца назад +1

    How many minute until it stops listening? Is there a way to adjust it? Or to tell it to stop listening?

    • @TechMakerAI
      @TechMakerAI  2 месяца назад +1

      Please see my reply to your newer question.

  • @HananPHashim
    @HananPHashim 28 дней назад

    Hi sir , how to change raspberry pi wifi while ssh

    • @TechMakerAI
      @TechMakerAI  28 дней назад

      Please check out this video: ruclips.net/video/KGtC7A8kONY/видео.html

  • @DoctorRobot-e4w
    @DoctorRobot-e4w Месяц назад

    Can I train the ai to produce me a particular types of answer as we can train chatgpt ?

    • @TechMakerAI
      @TechMakerAI  Месяц назад

      That is a great question. The answer is Yes. Large language models (LLMs) like Gemini are trained on massive data. While you may not be able to train AI from scratch, you have the option to fine-tune the LLMs. You provide additional data (answers) tailored to your desired questions, and the LLMs adapt.

    • @DoctorRobot-e4w
      @DoctorRobot-e4w Месяц назад

      @@TechMakerAI This is my School Project. After A long search I found this video and Thank you that this works. Now Can you help me more please? I want to train the bot that when I ask the bot a question, it answer me such a format that I trained it. How to do that. please help me

    • @TechMakerAI
      @TechMakerAI  Месяц назад

      It sounds like you want to fine turn the LLM. Please have a look at this article: www.datacamp.com/tutorial/fine-tuning-large-language-models

  • @m9playz239
    @m9playz239 2 месяца назад

    Hello....I have a doubt...if you could help... what if i don't use audio amplifier and directly attach a usb speaker....will it work????.....also can this work on raspberry Pi 3B?
    Also, what is the wake word for it and the word to stop it from listening??

    • @TechMakerAI
      @TechMakerAI  2 месяца назад

      Yes, a USB speaker will work too. I am working on a version of the hardware and will have a video about this topic soon. RPi 3B may work but will be slower due to the small memory size. The wake word is "Jack". To end the conversation with AI, you just need to say "That is all". It will continue to listen but will not respond. Just like Siri, it is always checking to see if you are saying the wake word. If you do not like to see the printed output, just comment all the print() statements.

    • @m9playz239
      @m9playz239 2 месяца назад

      @@TechMakerAI can you help me change the wake work if you can?

    • @m9playz239
      @m9playz239 2 месяца назад

      @@TechMakerAI can you make a video on usb speaker sonn cz I want to make this and present it in an exhibition after 2 weeks....I will be very grateful!

    • @TechMakerAI
      @TechMakerAI  2 месяца назад

      Just do a search and replace of all the "jack" with any name your like.

    • @TechMakerAI
      @TechMakerAI  2 месяца назад

      @m9playz239: You can use the current version of the code with a USB speaker. It should work too.

  • @xpectz
    @xpectz 2 месяца назад

    Script crashes from time to time, FYI. Something regarding the chat history and/or communication with the google gemini AI library. I looped the .py script to restart every 2 min as a workaround. Luckily, these sorts of errors are not too common.
    Also please tell me how to make it stop listening. I tell it "that is all" and it still picks up what I say.

    • @TechMakerAI
      @TechMakerAI  2 месяца назад +3

      Thank you for your feedback! I am aware of the communication issue with Google Gemini API. It can cause crash sometimes. I have seen less issues with the OpenAI ChatGPT API but that is not free. I made some changes to the code on line 259 in this version. When you say "That is all", it should stop interacting with Gemini API but it is still printing out what you are saying. You can comment out all the print() since you do not need it to print transcript when using RPi (It is there only for debugging purpose) or you can move lines 259 to 263 after line 270 (if "jack" in text.lower() and slang == "en-EN":). Note that this code was written so that users can interact with AI anytime they want. They can wake up AI and put it in sleeping mode. This voice assistant should be on all the time like Siri on your phone. If you stop it from listening, then how do you wake up it next time?

    • @xpectz
      @xpectz 2 месяца назад +1

      @@TechMakerAI Got it. I have follow up questions. If I do not say "That is all", how many minutes until it times out which will require the wake word? Which line can I modify this?
      Also, I already have an OpenAI API Key i paid for. How can I switch over to Open AI???

    • @TechMakerAI
      @TechMakerAI  2 месяца назад +2

      @xpectz: For your first question regarding how many times it takes for it to require the wake word, I think you can add an integer variable to count the times and then set the AI to sleeping mode after it reaches a threshold. For the OpenAI version, please see this video: ruclips.net/video/kIKgl3jDilY/видео.html

    • @xpectz
      @xpectz 2 месяца назад

      @@TechMakerAI How does it work now? When I stop talking to it, it goes to sleeping mode. What triggers it? I have not timed it. Will check out the video, thanks.

    • @TechMakerAI
      @TechMakerAI  2 месяца назад

      If you add an integer variable to count the times and then set the AI to sleeping mode after it reaches a threshold, then, it will be triggered by your integer. To wake it up, you just need to say the wake word again.

  • @Muhammedmishal1515
    @Muhammedmishal1515 16 дней назад

    Sir if we use rasbery pi 3 any change in code

    • @TechMakerAI
      @TechMakerAI  16 дней назад

      It should work with Pi 3 too but maybe a little bit slower. If you run into issues, please report back here.

    • @Muhammedmishal1515
      @Muhammedmishal1515 15 дней назад +1

      Thank you

    • @Muhammedmishal1515
      @Muhammedmishal1515 15 дней назад +1

      I am making this for school project

    • @Muhammedmishal1515
      @Muhammedmishal1515 15 дней назад +1

      How to code it can u make a explained video on coding pls

    • @Muhammedmishal1515
      @Muhammedmishal1515 15 дней назад +1

      I have also subscribed to u and watched all ur videos soo good ty

  • @keithng4209
    @keithng4209 Месяц назад

    I am a total noob with a 2nd had pi4. i followed all your steps but encountered the following after pip install -q -U google-generativeai:
    WARNING: Retrying (Retry(total=4, connect=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', remoteDisconnected( 'Remote end closed connection without response'))': /simple/protobuf/
    Does this mean the loading of the AI failed? How do i rectify this, please?

    • @TechMakerAI
      @TechMakerAI  Месяц назад +1

      It means that you did not install the Google Generative AI package successfully. I would recommend that you try it again. If it fails, you can always format the micro SD card and start from the beginning.

    • @keithng4209
      @keithng4209 Месяц назад +1

      @@TechMakerAI Thank you. I'll dp that and get the hardwares so I can do the voice test, like you did in your earlier video.

    • @TechMakerAI
      @TechMakerAI  Месяц назад

      Yes, that is a good idea.