I have decided to start a personal project using Python since I have used it for several years now and I would like to know if the approach that I have considered is good or not.
It's really simple if you know Alexa / Siri / etc. I have a device which will interact with it's owner given a single area: Music. The scenario as I saw it it's like this:
Owner [voice]: "- I want to listen a sad song, please play me one!"
[backend action here]
- The command will be saved as an audio file in a specific folder.
- I'm using watchdog to monitor file system events - in this case, the creation of an audio file in a folder.
- Convert the above audio file to text using Google API Speech service.
- Search in a database for some key words like: "listen", "sad", "song", "play" and create a response [text] based on them (try to narrow down the searches and guess what the owner wants - not sure how to do this, though)
- Convert the above question to speech using gtts. This will save the audio file to another folder. This file will be played by the device.
Device [voice]: "- Would you prefer a specific artist or genre?"
Owner [voice]: "No."
[backend action here again] - this can occur multiple times if needed and if the owner wants more specific results.
- The command is again processed and converted to text.
- If the command would've been "Yes, I want to listen to a song played by Richard Marx" I would've looked again in the database for the new keywords and go to the specific location of songs played by Richard Marx and play one of them.
- When the command is "No.", I have to search for a sad song in the DB, go to the specific location of that song and play it.
This is the main idea (on a larger scale). A device (its knowledge should involve the music field like: artists / songs / genres / etc.) which can interact with its owner so that it can give him exactly what he wants.
Now, I know that I'll have to use a large storage where I can keep all the music, and the DB, but let's assume this is already handled.
What I want to know is if my approach / logic is good enough or if there are better / easier ways of doing this. More, a bit of help with the "not sure how to do this, though" part from above would really help me!