Voice to Voice ChatGPT on Your Phone (Easy)
9:29

Voice to Voice ChatGPT on Your Phone (Easy)

The AI Advantage 24.06.2023 27 601 просмотров 733 лайков обн. 18.02.2026
Поделиться Telegram VK Бот
Транскрипт Скачать .md
Анализ с AI
Описание видео
Need help with automation and custom bots? Check out my brand new agency: https://myaiadvantage.com/agency Today we look at how to build a chatbot that takes voice messages AND speaks back. It works inside of telegram and is very beginner friendly. View the playlist with all 3 tutorials here: https://www.youtube.com/playlist?list=PL4mzDJldtFs2DduP-SiPzkiC1RpoU175c Get the code in a folder: https://drive.google.com/drive/folders/1IUio9EX4iCkcriZIIGhazcXwrHUL9rvY?usp=sharing Get the code from Github: https://github.com/AIAdvantage/gpttelegramva.git 00:00 Who is This For? 00:56 First Steps 2:07 Free Voice Assistant 5:21 The Advanced Voice Assistant #aiassistant #chatgpt #telegram Free AI Resources: 🔑 Get My Free ChatGPT Templates: https://myaiadvantage.com/newsletter 🌟 Receive Tailored AI Prompts + Workflows: https://v82nacfupwr.typeform.com/to/cINgYlm0 👑 Explore Curated AI Tool Rankings: https://community.myaiadvantage.com/c/ai-app-ranking/ 🐦 Twitter: https://twitter.com/TheAIAdvantage 📸 Instagram: https://www.instagram.com/ai.advantage/ Premium Options: 🎓 Join the AI Advantage Courses + Community: https://myaiadvantage.com/community 🛒 Discover Work Focused Presets in the Shop: https://shop.myaiadvantage.com/

Оглавление (4 сегментов)

  1. 0:00 Who is This For? 222 сл.
  2. 0:56 First Steps 305 сл.
  3. 2:07 Free Voice Assistant 778 сл.
  4. 5:21 The Advanced Voice Assistant 995 сл.
0:00

Who is This For?

I'm very excited about this one because today we'll be making a chat bot on your phone that you can talk into and it actually talks back that is Sensei Igor for you apologies Sensei Igor I will make sure to address you correctly in the future and the best part is this is actually very easy to build even for beginners I'll be holding your hand for the entire process step by step as we first build a version that is completely free and then the second version we'll use the 11 Labs API giving you a chatbot voice that sounds like a real human greetings my beloved Master as requested I will gladly provide you with an essay about penguins but look everything covered in this video is extremely beginner friendly which means it's not all it could be right if you happen to need a custom chatbot or you want to make your company more efficient by implementing AI well here for the first time I'm announcing the AI Advantage agency me and my team are already helping businesses Implement AI build chat Bots and so much more so check it out under the following link and now back to the video and again all of this has been prepared to be extremely beginner friendly but what this is
0:56

First Steps

part 3 of my mini series that I released on my YouTube for free so if you're completely new to this you have to watch those two videos because we'll be building upon that knowledge and the steps we did in those two tutorials they too are extremely beginner friendly and they cover most of what we need here because first of all we need an IDE which is set up in the first episode secondly you need your open AI API key which I showed you how to get in the first episode that couldn't be any simpler and thirdly we'll need the telegram Bots to which I introduced to in the second episode because again this easy to build chatbot will be based within telegram you'll be speaking to it why do you call me master it will be speaking back to you I apologize if using the term master and all inside of an app that all of us can get on our phones the only thing that is new here is the code for today's video as per usual you can download that from the description below or copy it up from my GitHub if you're more advanced and these are the four files on there so the first one is the old code from the second video that we'll be building up on secondly we'll be building a free version of this chatbot with the Google Text-to-Speech integration which is completely free and gives the chatbot the ability to talk back to you and thirdly we'll be using 11 Labs API because there voices actually sound like real humans there is a free trial but if you want to keep using it that will cost some money so first things first as in previous tutorials I will just grab this
2:07

Free Voice Assistant

folder and drag it onto Visual Studio code all right and here are the files we need but as the very first step we want to install all these requirements because that will make sure we have all the packages we need moving forward and we don't need to install them one by one while moving for this a very brief overview here would be that this is the Google Text-to-Speech which allows us to transform text into speech for free movie Pi allows us to work with audio files inside of our little scripts here so that the chatbot can understand the voice notes we record numpy is a library that is required for the 11 Labs library to work and is the one that will give us those realistic human-like voices that we're looking for here and then these two are kind of obvious openai allows us to interact with jet GPT and python telegram bot allows us to call the telegram bot from within here that works easily on any phone alright enough talking let's start doing go to terminal new terminal and inside of here you need to run one command to install all of this at once on Mac that is PIP free install Dash r requirements. txt as that is the file and by hitting enter I will install all of these packages onto my computer looking good if your windows you can run the same command just without the free so it's pip install Dash R requirements. txt and with that we're all set up which makes us ready to dive into the code which will make the magic happen and as you can see I did include the old code that we're building on top of here for learning purposes as I find this extremely useful then you can switch back and forth and see what's changed with the new chat bot but again even this old code was super simple you're bringing all the packages that make all this happen then you link your accounts with the API keys this part includes chatgpt and here we integrated into telegram this function makes the voice input into the telegram bot happen and last but not least this bottom part launches the telegram bot and keeps it running while we keep the script running and by opening up the zero one gtts which stands for Google text to speech we are ready to take this a step further and allow the bot to talk back to us and as you might have already noticed there is no new API key and that is because this service is completely free you can use it as often as you want it's not very high quality but it will speak to you and it costs no money so it's perfect to experiment with of so first things first I'll copy paste my open AI API key into here now we're linked to chat GPT secondly we'll paste our telegram API token that we got from the botfather just like I showed you in the last video and guess what that is kind of it we're ready to go and this would already work as I provided you with the code here I'll just briefly point out that this is where most of the magic happens where it takes the text responds saves it as a MP3 and then sends it back to the telegram bot taking the chat GPT answer and presenting it to you through the voice that Google Text-to-Speech creates here and then down here it's the same thing all we need to do now is press play like so and the script is running and all of a sudden are bought inside of telegram should be able to respond with voice messages Let's test it out so what we're going to do here is just press start so once we start this brand new bot we can record a voice message into it write me an essay about penguins as per usual and there we go it shows us I've received a voice message please wait and it also shows my input write me an essay about penguins now all we have to do is wait for a few seconds there we go our full chat GPT answer and as you can see up here we have the voice reply so if I hit play on this Penguins these flightless birds belong to the family's phenicidi and live in the southern hemisphere mainly in Antarctica though they can also be found in South Africa okay so now we're about to look
5:21

The Advanced Voice Assistant

at the most exciting part of this entire tutorial because here we're going to be getting a realistic voice greetings my beloved master from a site called 11 labs and using that with our script so the phone is going to talk back in a realistic human-like sounding voice okay and all this is made possible by this company called 11 Labs which has these voices that are incredibly realistic just check this out for a second so I'll just fill this out and here you can pick the voice so we'll just pick the default one and say generate hey there how are you doing Igor this is a little too good to be real do you hear that let's do that again hey there how are you doing Igor this is a little too good to be real and as I said you can change this to Arnold let's just try that out say generate hey there how are you doing Igor this is a little too good to be real okay so we're gonna be using this for our app how do we do that well as you might have guessed we need an API key which you can simply get by going up here profile and then you can copy your API key which we'll be using in the script 0 to 11 Labs chatbot so just open that up and we'll be inserting the 11 Labs API key right here and that is essentially it guys look we actually made this happen this would already work but let me spend a few seconds explaining what's going on here roughly just like before we have a little bit of code that extends this and makes 11 Labs working here so as you can see in both the text message and the voice message function we have a few new lines down here that make 11 laps work it links it to the API key and you actually get to pick the voice in here too and that is hidden up here so you can see the voice equals user. getvoices by name and here you can pick it so on the website you will be able to test it and go through all the various voices and once you find one that you like you can copy the exact name that you see here and update your little script by changing this out to let's say Arnold and there you go that's really it if you want to understand this more in depth you can go over to their API reference to get a developer documentations it's also that link I'll include below but you can go in and look into the entire implementation I won't be going for every single line in here plus we've been copying over the stuff from before that has already been explained so with all that being said and this thing being set up we can go ahead and test this so as you can see we have the same role as before where the helpful assistant is going to be calling us Master every time and let's just try it out I'll hit play up here and because we insert all the packages at the beginning including 11 laps remember when we ran the requirements we installed 11 Labs lib now we're going to put it to work by saying terminal new terminal and then let's hit play and it should be running so now all I need to do is pull up my phone open up telegram go into my voice Bots and now I can record a voice message and I should get one back so let's try this out write me an essay about penguins so now we should see a transcription write me an essay about penguins and now as per usual we need to wait for a little bit while GPT processes this and the 11 Labs generates the voice but in a few seconds here we should get an answer and there you go as you can see we got the GPT reply here and above we have the voice message that we can now play greetings my beloved Master as requested I will gladly provide you with an essay about penguins isn't that just incredible and that's really how simple it is all you gotta do is keep this running on your computer because this script makes it work yes you could alternatively host it but that goes Way Beyond the scope of this tutorial I'll include a link in the description that shows you that too but this is essentially it you can adjust the name system message and at the very least you have the ultimate party trick in your pocket chat GPT that you can talk to it speaks back in any voice you pick and as previously mentioned you could go even further with this you can teach it on specific data or give it a very specific role so it can help any business function even smoother Additionally you can automate away a bunch of processes and now we offer all those Services through the AI Advantage agency you can find more details on all that under this link and again if you haven't seen the first two episodes that explain the step-by-step to a complete beginner then check out this playlist with all the videos in this series and how to build your very own chat spot by yourself without any coding knowledge required why do you call me master I oter master has caused any confusion used as a sign of respect and formality from here on out call me Sensei understand Sensei from now on I will refer to you as Sensei that is Sensei Igor for you up Igor I will make sure to address you correctly in the future how may I be of service it works

Ещё от The AI Advantage

Ctrl+V

Экстракт Знаний в Telegram

Транскрипты, идеи, методички — всё самое полезное из лучших YouTube-каналов.

Подписаться