|
Post by AnthroHeart on Mar 25, 2024 20:41:17 GMT
I got the idea from a youtube video and asked Claude 3 Opus to create a personal assistant that is voice activated in Python.
It listens for the word "genius".
It then listens for your prompt. It sends this prompt to OpenAI using their API. You will need an OpenAI API key saved in the file OPEN_AI_KEY.txt
It returns the response and reads it out loud. It is a little finicky when listening to your wake word, though it seems to capture the prompt nicely.
It outputs while it's running, so you can see.
The libraries needed are: pip install SpeechRecognition pip install -U gtts pip install pydub python -m pip install pyaudio pip install ffmpeg pip install -U openai==0.28
|
|
|
Post by reden on Mar 25, 2024 20:46:48 GMT
I got the idea from a youtube video and asked Claude 3 Opus to create a personal assistant that is voice activated in Python.
It listens for the word "genius".
It then listens for your prompt. It sends this prompt to OpenAI using their API. You will need an OpenAI API key saved in the file OPEN_AI_KEY.txt
It returns the response and reads it out loud. It is a little finicky when listening to your wake word, though it seems to capture the prompt nicely.
It outputs while it's running, so you can see.
The libraries needed are: pip install SpeechRecognition pip install -U gtts pip install pydub python -m pip install pyaudio pip install ffmpeg pip install -U openai==0.28
You can write the packages in a requirements.txt , then do pip install -r requirements.txt or something like it, and it will automatically install them. You can also specify more set versions if you'd like.
|
|
|
Post by AnthroHeart on Mar 25, 2024 21:02:43 GMT
Thanks, I added that to my Repo.
|
|
|
Post by AnthroHeart on Mar 25, 2024 21:09:00 GMT
It's not as smooth as the ones that Pi or ChatGPT have for voice chatting. There is a 10-second or so delay between speaking the prompt and having it speak a result.
|
|
|
Post by reden on Mar 27, 2024 13:30:10 GMT
It's funny Claude was used to create an OpenAI API client.
|
|
|
Post by AnthroHeart on Mar 27, 2024 13:42:52 GMT
I probably could have gotten the same functionality from GPT-4.
|
|