#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)
Das Elektor Magazine gehört seit 65 Jahren zu den führenden Informationsquellen für Elektronikingenieure, Entwickler, Start-ups und Unternehmen. Unser Magazin wird von einer aktiven Community aus Elektronikingenieuren – von Studenten bis zu Profis – getragen, die mit Leidenschaft innovative Ideen entwickeln und teilen.
Für diese veröffentlichen wir jedes Jahr Hunderte von Beiträgen in Formaten wie Artikeln, Videos, Webinaren und weiteren Lernformaten. Unsere Mission ist es, Wissen auf jede mögliche Weise zu teilen und die Leser mit den neuesten Entwicklungen im Bereich der Elektrotechnik zu inspirieren.
Vielen Dank für Ihre Bewertung!
Kommentar hinzufügen
Vielen Dank für Ihre Bewertung!
Möchten Sie einen Kommentar mit Ihrer Bewertung hinterlassen? Bitte melden Sie sich unten an. Nicht gewünscht? Dann schließen Sie einfach dieses Fenster.
Diskussion (0 Kommentare)