Create a Bard Voice Assistant with Python

แชร์
ฝัง
  • เผยแพร่เมื่อ 11 พ.ค. 2023
  • Learn how to create a python voice assistant that can prompt Bard Ai. This program is free to run. I explain thoroughly how to setup your machine for the python project. The code is explained line by line to help even beginners get a deep understanding of how all of the code works. Learn how to access Google Bard through your Python code. Subscribe for my videos on Python for beginners and AI.
    My code for this project: github.com/ai-...
    VoiGPT: voigpt.com
    Official Ai Austin Discord: / discord
    Help me make more videos:
    www.buymeacoff...
    #programming #python #ai
  • วิทยาศาสตร์และเทคโนโลยี

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

  • @jeremybrook8452
    @jeremybrook8452 ปีที่แล้ว +7

    hey I can't make it work im on windows and I got this message
    TypeError: Chatbot.__init__() missing 1 required positional argument: 'secure_1psidts'

    • @Ai_Austin
      @Ai_Austin  ปีที่แล้ว +7

      Bard made a change where you need the token we showed in the video and this token. You can find the token in the same location as the secure 1psid.
      Check the Bard API github from the account 'acheong08' for this and any other changes to the API. It will explain how to pass the new token in your code.

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

      @@Ai_Austin thank you boss ‼️

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

    I'm not sure if the reverse-engineered library for Bard changed after you created this guide. I updated code to add a new var and update the call to the chatbot it requires additionally the Secure-1PSIDTS token
    tokents = "insert token here"
    chatbot = Chatbot(token,tokents)
    This seems to work now. New to python and AI so sharing my solutions to anyone else following your guide

  • @khandoor7228
    @khandoor7228 ปีที่แล้ว +6

    Dude keep going this channel is cool!

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

    Thanks for sharing this experiment. Your solution is sending audio from microphone continuously to OpenAI Whisper for hot word detection. This has two issues (1) Everything you say in the room 24x7 is being sent to OpenAI, which means privacy is compromised (2) Whisper API costs money; a year of sending audio 24x7 to Whisper will generate a significant bill.
    Hot word detection should be done locally. However current local detection, even with Siri, Alexa and Google Home devices, does not work reliably causing annoyance. This annoyance will be even more if the hot word has to be used in a conversation. There has to be a better way to do this. Solving the hot word problem can upgrade your solution from a science fair demo to a practical product. Keep going at it.

    • @Ai_Austin
      @Ai_Austin  ปีที่แล้ว +9

      Hey Parul that's actually not true. I'm not using the whisper API. Im using whisper locally. No data gets sent to OpenAI from this program. The only data saved by anyone is the prompt being send to Bard.

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

      @@Ai_Austin I must have missed that. Now it is totally awesome! I need to do it as well. Thank you!

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

      whisper runs locally

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

    Now I just want to buy a Raspberry Pie and try all that to have my own little assistant!
    Impressive video, thank you

  • @bobby5enpai
    @bobby5enpai 11 หลายเดือนก่อน +3

    Exception: Enter correct __Secure_1PSID and __Secure_1PSIDTS value. __Secure_1PSID value must end with a single dot.
    I've removed the dot and added the dot. Not sure how I fix it.

    • @akebu6
      @akebu6 9 หลายเดือนก่อน

      you need to have two tokens, the _Secure_1PSID and _Secure_1PSIDTS

  • @mbegangsylvain1076
    @mbegangsylvain1076 ปีที่แล้ว +7

    Well! Unfortunately i'm not in USA but fortunately VPN exist. 😅

  • @morabargav1544
    @morabargav1544 ปีที่แล้ว +7

    hi austin, can you make a video on how to make a ai (bard or chat gpt doesnt matter) voice assistant for android which can turn on or and off iot devices and answers back to user like any other assistants when you call by name

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

      i would love too to have it on my phone instead

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

      Tasker app. can be configured for that. there are openai plugins in there. I've done it last month

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

      @@JoeTinnySpace yeah but how. Can you explain it to me

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

    I keep on getting the error
    "Error transcribing audio: module 'ffmpeg' has no attribute 'Error' "
    I've tried uninstalling and reinstalling ffmpeg and ffmpeg-python but it didn't solve the problem. Please help

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

    excelentes videos, me sumo a todos estos proyectos que lanzas... una consulta como hago para poder tener un avatar como el tuyo, preferiría poder elegir una foto y como sincronizo el avatar con la voz? se que existen servicios así como DD pero como te moves en el mundo underground de las IA me imagino que tenes una forma de hacerlo independientemente, sin limitaciones (free or open source xD)

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

    Can you by chance have the response include code to return the voice from elevenlabs? :D

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

    Great video dude, for real, I love your content tbh. I've tried both this one and the last GPT and Bing one but both get me the same ffmpeg issue and i really don't know how to do, i'm kinda new to python.
    Terminal says this:
    Error transcribing audio: module 'ffmpeg' has no attribute 'Error'

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

    Impressive! i got a challange show us how to create AI assistant with virtuall avatar also it would be cool if you can change name of assistant and have option to speeks in deffrent languages

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

      you can change the name at line 60, where its looking for a specific word, u can change that from bard/google to any other thing. and this is an unofficial wrapper for bard so you cant select languages rn. Hope i could help 😊

  • @imamethyx
    @imamethyx 7 หลายเดือนก่อน

    I followed everything step by step, I am running this on windows and quite new to python but the error I run into is Error transcribing audio: [WinError 2] The system cannot find the file specified. I checked the folder and the audio file actually gets generated and even listened to it. I wonder why this is happening

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

    I have recently created a virtual AI Science Tutor for kids. Does anyone know where I might be able find an open source interactive avatar like this one to provide a face to my virtual assistant?

  • @Rohitpatil-ng8mb
    @Rohitpatil-ng8mb ปีที่แล้ว +2

    Say "Google" to wake me up.
    Wake word detected. Please speak your prompt to Bard.
    Sending to Bard: can you please name five fruits found in India
    Error occurred: 'NoneType' object is not subscriptable

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

    Why didn't you use chromadb for text colourization for Windows?

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

    Nice boss

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

    i am getting this error - OSError: libespeak.so.1: cannot open shared object file: No such file or directory

  • @user-zw7hk7sk7m
    @user-zw7hk7sk7m ปีที่แล้ว +3

    You need to make a GUI for this!

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

    Are you using wav2lip for your character? If not, what are you using?

  • @willmaskim
    @willmaskim 3 หลายเดือนก่อน

    how can you do this for a mobile device

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

    Is there a way i can make it hear my voice faster and more effiecently so it ehars me nearly 100% of the time im on windows.

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

      Yes. The speech recognition listen function is by far not the best method as far as reliability works. I'm currently researching and coding out better ways for audio detection.
      This is by far not the last voice app video on this channel. Lots of features I want to add and will make videos discussing that in the future.

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

      @@Ai_Austin Thanks I look forward to seeing more videos in the future amazing channel.

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

    So if I understand well, using this method the wake up word can be anything? If so, which Raspberry Pi model you think would be enough to run all that? Knowing that I'll need to plug a microphone, a speaker, and eventually a wifi module on that...

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

      Also, since bard isn't available in my country yet, do I need to constantly run the program through a VPN, or would the VPN only be required during the initial setup?

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

      Yes you can change the wake word to anything. VPN will be required to run always until they release in your country.
      As far as raspberry pi, you will want to research how the OpenAI whisper models run on different pi models. One of the newer faster ones will run the code as is with ease. A slower one you may need to use the tiny model for the prompt to make it run faster.

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

    Can you please make a tutorial about implementing bard with Siri in iOS ?

  • @ajitesh8049
    @ajitesh8049 9 หลายเดือนก่อน

    a dumb doubt brother.. will this program only wake up on saying google? cant we set another keyword?

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

    Weird he didn’t try to implement bard too, I mean it’s pretty heavy on my intel mag lol so I get it

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

    Can you do The Reverse engineered API for Quora's Poe? I find Claude to be more conversational.

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

      Nvm I managed to do it

  • @iam-Coder
    @iam-Coder หลายเดือนก่อน

    will this code still work as now it is GEMINI

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

    Need to add your system information and software versions, I tried to recreate what you have done but it's not compatible with the newer versions of Python (3.12) I had to search for hours in forums to find this out. and Then I downgraded to 3.11 to get it working.

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

      2:20 😉

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

    please update tha repo so we can have gpt3.5, bing and bard in one program

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

    Bard Ai is publicly?

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

    we got bard in Australia i think almost everyone has it

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

      Yep they gave access to a lot more countries the day this was uploaded.

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

    The AI generated avatar is amazing but the voice uses a tone that looks like he is fighting, I suggest using a more relaxed tone for the voice over .

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

      Sounds to me like he had his coffee. This voice is working perfect for my use. Thanks for your feedback.

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

      and also please reduce the size of the avatar when showing the code, I know it's really amazing and innovative, but when we look at code it's all what we need to see ;)

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

      ​@alifellahi also please make your own channel or shhhhhhhhhh

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

    I am having this issue "Exception: SNlM0e value not found in response. Check __Secure-1PSID value." . If anybody knows what to do please tell me .

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

    Hey @Ai Austin, great content. Do you have a discord channel?

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

      Not yet, will have one soon.

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

    most of the time when i talk to it it takes my input in arabic even tho i am speaking english can you help ?

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

    how to make speaker face ?

  • @bens4446
    @bens4446 7 หลายเดือนก่อน

    So this is better than Davinci?

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

    Are you on an M1?

  • @andreatarricone4818
    @andreatarricone4818 10 หลายเดือนก่อน

    Hi, i don't find the secure_1psidts in my dev instrument, what can i do?

    • @mariogomes1347
      @mariogomes1347 7 หลายเดือนก่อน

      I have the problem, how did you solve it?

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

    Works but extremely slow and seems not to capture my voice at all sometimes. I've check my microphone input levels, all good. Maybe bard is under heavy load?

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

      Running fast for me today! If you can elminate background noise in your room it works best. Sometimes if it detects other sounds it will think you are still speaking. Leading it to keep recording longer than you actually spoke.

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

      @@Ai_Austin OK, thanks. I do have the window open! And thank you for your content, I really like your practical and no-messing/straight-to-the-point style: it's refreshing and easy to watch unlike many channels. Really great work and helping me hit this wave :)

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

    did not work for me. i modified the code according to a comment. STILL NO LUCK

  • @ardaucok
    @ardaucok 7 หลายเดือนก่อน

    Can we add Operating system commands in this code ?

    • @Ai_Austin
      @Ai_Austin  7 หลายเดือนก่อน

      Absolutely. You could even use function calling to let AI call the commands intuitively or hard code it into your program!

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

    Austin, igot this error :
    response = prompt_bard(prompt_text)
    response = chatbot.ask(prompt)
    PycharmProjects\myAIassistant\venv\lib\site-packages\Bard.py", line 83, in ask
    return self.loop.run_until_complete(self.async_chatbot.ask(message))

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

    combine all

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

    Hey great video, I was just wondering why do i keep getting this error? Error transcribing audio: [WinError 2] The system cannot find the file specified. I tried to proofread the code and everything but I can't seem to solve the issue, thank you for your time!

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

      Your getting that error because windows is very crappy for development. Everything code related requires some hack arounds to get it functioning on windows.
      It will work, just a matter of diving into that windows specific error. I'd highly recommend installing linux on a hard drive for development and then deal with making windows work after if you want your programs on your windows machine.

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

      @@Ai_Austin great!thank you for your reply i’ll check in to getting linux too

  • @H.and.k
    @H.and.k 6 หลายเดือนก่อน

    Sorce code ?

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

    Getting this error before bard can respond to my prompt:
    Say "google" to wake me up.
    Wake word detected. Please speak your prompt to Bard.
    Sending to Bard: What's your name? What is your name?
    Traceback (most recent call last):
    File "C:\Users\tarun\Desktop\AI voice chatbot\BardVoice\main.py", line 98, in
    main()
    File "C:\Users\tarun\Desktop\AI voice chatbot\BardVoice\main.py", line 88, in main
    response = prompt_bard(prompt_text)
    File "C:\Users\tarun\Desktop\AI voice chatbot\BardVoice\main.py", line 29, in prompt_bard
    response = chatbot.ask(prompt)
    File "C:\Users\tarun\AppData\Local\Programs\Python\Python310\lib\site-packages\Bard.py", line 132, in ask
    "content": json_chat_data[0][0],
    TypeError: 'NoneType' object is not subscriptable

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

    Where did you start learning stuff like this? I want to be able to build stuff like this without tutorials

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

      Start with reading the free book "How to Automate the Boring Stuff with Python" work on it for 1-2 hours at a time. That will give you all of the basics in just a couple weeks.

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

      @@Ai_Austin yea i know about this book, but never read. ig i never needed to as i already did all the projects in the book by myself 😆

  • @bobby5enpai
    @bobby5enpai 11 หลายเดือนก่อน +1

    The import bard doesn't work. I've followed your tutorial and have installed bard, but it does not import it in my vs code.

    • @bobby5enpai
      @bobby5enpai 11 หลายเดือนก่อน

      Fixed this. I had to lower my python to 3.10

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

    Hi, I recently made BardReadAloud chrome extension to automatically read aloud bard response. Have a try!

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

    i need it for windows broooo pleaseee!!!!

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

    ModuleNotFoundError: No module named 'Bard'

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

      Means you didn't install Bard for the Python versions you are running.

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

      @@Ai_Austin ok thank i already fix it

  • @user-jr9oz3xq3z
    @user-jr9oz3xq3z ปีที่แล้ว

    Exeption has occurred: AttributeError X AttributeError: 'NoneType' object has no attribute 'group' at line 12 chatbot = chatbot(token) (i'm not in usa) compliments for your video austin, any idea how to fix it?

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

      Are you using a vpn connected to a USA or UK server?

    • @user-jr9oz3xq3z
      @user-jr9oz3xq3z ปีที่แล้ว

      @@Ai_Austin to usa

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

      And Bard is working for you in the browser with the VPN?

    • @user-jr9oz3xq3z
      @user-jr9oz3xq3z ปีที่แล้ว

      @@Ai_Austin yes

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

      Has to be an issue with the code or your installation of the Bard library.

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

    ⭐⭐⭐⭐🌟

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

    Bro how do I talk to you (while remaining anonymous) about your bots and some help😢 with another broke boy

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

      I do not offer private consultation for free. You are welcome to ask any questions you have in my free public discord.

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

    this tutorial is so confusing because im on windows, please make a bard assistant video for windows.

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

      Programming in general is a lot less fun on windows. I would recommend just not using windows, that's what I will continue doing.

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

    Is this working in india!

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

    from Bard import Chatbot
    ModuleNotFoundError: No module named 'Bard'

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

      Is it installed for the python version you are running ?

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

      @@Ai_AustinPython 3.10.2, solved installing all packages manually but now is not recognizing my voice just looping
      "Say "google" to wake me up.
      No wake word found. Try again."

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

      Its saving the audio correctly but not working for any reason

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

      Has to be a microphone issue or you are speaking before the program started listening.

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

      @@MacacoBellaco how did you manually installed the packeages? I mean python packages or Bard api 's packages?

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

    how did you get unlimited A.I voice from elevenlabs ?

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

    please vosk and how to make speake face ?

  • @tugatek
    @tugatek 7 หลายเดือนก่อน

    😏

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

    Gotta stop ghosting us like that for three months…weeks sorry

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

    hello I am having some trouble here with an error code I was wondering if I need something else to actually make it work " File "C:\Users\Elish\OneDrive\Documents\Bard\main.py", line 12, in
    chatbot = Chatbot(token)
    File "C:\Users\Elish\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\Bard.py", line 63, in __init__
    self.async_chatbot = self.loop.run_until_complete(
    File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.3056.0_x64__qbz5n2kfra8p0\lib\asyncio\base_events.py", line 649, in run_until_complete
    return future.result()
    File "C:\Users\Elish\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\Bard.py", line 143, in create
    instance.SNlM0e = await instance.__get_snlm0e()
    File "C:\Users\Elish\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\Bard.py", line 188, in __get_snlm0e
    raise Exception(
    Exception: __Secure-1PSID value must end with a single dot. Enter correct __Secure-1PSID value."
    I am on windows btw

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

      You seemed to have either typed your access token for bard wrong or didnt add it in at all. Watch back the section of the video for getting your bard access token setup.

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

      @@Ai_Austin oh thank you!

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

    Awesome! How about using ElevenLabs API access for the voice next incl. using different (custom) voices? Didn't watch the full video yet, maybe my question is outdated

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

      I personally wouldnt want to pay 22 a month for a limited voice assistant so am not planning on that.

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

      Try including bark

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

      @@Ai_Austin How about Tortoise TTS?

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

    Say "google" to wake me up.
    /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/whisper/transcribe.py:114: UserWarning: FP16 is not supported on CPU; using FP32 instead
    warnings.warn("FP16 is not supported on CPU; using FP32 instead")
    Error transcribing audio: Could not load sound with filename, although URL was good... file:///Users/zaursamadov/Desktop/KGB_45/wake_detected.mp3
    I'm keep seeing this error. do you know how to fix it sir?

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

      You're trying to transcribe the wake_detected.mp3 file. That should be the beep notification sound file.
      The wake word detection code is supposed to transcribe the wake_detect.wav file.