#note: I had to change the script for GPIO stuff. Go into chatbot.py (I use nano). I uncommented out the old RPI.GPIO stuff and put in the new gpiod stuff.
“cd local_llm_assistant
Sudo nano chatbot.py”
Edit the script by hashtagging the code below as shown:
try: while True: button_state = button_line.get_value()
if button_state == 1:
main()
finally:
button_line.release()
Then save chatbot.py
Make sure you are in:
“cd local_llm_assistant”
Start up the LLM with:
./TinyLlama-1.1B-Chat-v1.0.Q5_K_M.llamafile
Then, in a different window, start the voice assistant software:
python3 chatbot.py
Wait a few seconds until you see the "Ready..." message, then press the button when you want to talk. When you see the "recording" message, speak your request. After the LLM completes its work, the response will be spoken through the speaker. (Since I’m a noob, I didnt do this, I just watched the script output. Also, if you do not attach a button, mic loop just stays open for about 3 seconds and if you talk fast you can get your question in, lol)
Elektor Magazine is al 65 jaar een van de toonaangevende informatiebronnen op het gebied van elektronica voor ingenieurs, ontwerpers, start-ups en bedrijven. Ons magazine wordt ondersteund door een actieve community van elektronica-ingenieurs – van studenten tot professionals – die gepassioneerd zijn over het ontwerpen en delen van innovatieve ideeën.
Voor hen publiceren we jaarlijks honderden items in verschillende formats, zoals artikelen, video’s, webinars en andere leervormen. Onze missie is om kennis op elke mogelijke manier te delen en lezers te inspireren met de nieuwste ontwikkelingen binnen de elektrotechnische sector.
Bedankt voor uw beoordeling!
Voeg hieronder eventueel commentaar toe!
Bedankt voor uw beoordeling!
Reactie bij uw beoordeling plaatsen? Log hieronder in. Geen behoefte aan? Sluit dan gewoon dit venster.
Discussie (0 opmerking(en))