I Want to create a Music player from voice command , help

February 10, 2024, 11:59

suzzit911

So basically we are told to create any project using raspberry pi in our college. I have great project idea that is we'll be creating a music player from voice command. I have created discord music bots using node.js so I'll be using the same method in this project as well with google transcript packages for catching the command from microphone. Whenever the user says play song_name the code will execute and fetch the music from youtube ( using ytdl ans ytsr packages in nodejs ) and it'll then send gpio signals which will result into playing the song from the speaker. We are getting Rpi 3 B+ from college will that work ? Basically , this is my first time creating any project in raspberry pi am i doing any mistake till now ? Also i want to create a online model of this project where can i do the same ? Additionally this project is not available on youtube or any other platform ( as of my knowledge ) can someone list the components that I'll be needing i tried chat gpt but indeed its ai and folks here a well experienced. Any guidance apart from these is welcomed

oops.se

First you need to decide on strategy, Local or cloud Voice recognition. Cloud this is similar as Alexa, Siri and Google home. A wake work is detected locally and then is the "Voice to text" done in the cloud. The cloud service is NOT free. Local this is when everything "Wake word" and "Voice to text" is done locally, example "Home Assistance Assist". Is a Raspberry Pi 3 enough? Well less CPU = Longer time and more delays. And I advocate Local as that is far more resilient that building long chains of dependencies. And privately I would love to see a MP3 example, extracting metadata and play from that collection.

suzzit911

Thank you for the response raspberry 3 is all we got i hope it wont delay much long. Talking abt cloud voice to text , node js has @google-cloud/speech npm package which is free to use. Coming to MP3 topic i thought of this but by using this we'll have limited no. of songs which use will be able to play by voice command obv we cannot import all the songs in our local collection i think ytdl package will be better approch since it will stream music directly from youtube

oops.se

Well the cloud has several drawbacks that many home automaters have begun to steer away from

suzzit911

I see , can you enlighten on how to transcript voice to text locally ? Is there any software on rpi itself that does the same ?

oops.se

Check "Home Assistant" and the subproject "Assist"