How to get the timestamps of lyrics in songs? - python

We have built an application in Python for getting the lyrics of a song that the user searches for. We are using the Genius API for this. However, we also want to know the timestamps of each lyric in the song, so that we know when each lyric plays or shows up. Is there an API or library that we could use to get the timestamp of each lyric? Or would we need to manually recognize each lyric in the song using an audio recognition technique?
Thank you for all of the help.

Last time I looked, Genius Lyrics' APIs do not include timestamps unfortunately. There are alternatives out there, such as Musixmatch - although they're not free (and apparently not cheap).
I did find Lyrics Plus though. It's an integration for Spotify. Maybe their code on GitHub could help. Good luck!

Related

python voice signature identification?

I'm working on a system that locks several parts in my computer and opens them ONLY using my voice saying specific
words (in python). I've already made the system that locks parts in my computer until you give it password but I want to change it to voice.
I did find some voice processing on the web but its really complicated and without explanation
in python.
I know python might not be the right language to do so, but I want to try!
thanks for any help!
You can start from pre-built services, like Azure Speaker Recognition. The process is quite straightforward, you provide audio training sample for each single speaker (yourself for example). This will create an enrollment profile based on the unique characteristics of your voice. If your are looking to build a solution from scratch, then Fast Fourier Transform would be a great start.
Python is a good point to start!
Search Python Speech recognition in google in you will have a lot of examples for doing that.
Enjoy!

How to get the currently played media title on windows using python?

How do I get this title using python?
I haven't tried anything yet since I do not know which library should I use and how.
Have a look at this StackOverflow Question - since your picture as music played by spotify, this question might help you.
How to get Spotify current playing song in Python (Windows)?
They are referring to this Library: https://github.com/XanderMJ/spotilib
If you wanna directly control spotify via Python you might also have a look at this library: https://pypi.org/project/pyspotify/
For interaction with the Spotify Web Api, this might also be helpful: https://spotipy.readthedocs.io/en/2.16.1/

Automatic voice recognition when a word is said

I am trying to create a simulation of Alexa or Google Home (very basic). I am using the SpeechRecognition module with the Google as recognizer. I have managed to get it working but I don't know how to run the whole script when I say a word (I want it to be hearing always (as Alexa does)).
Ex:
'Hey, Robot'
AI = Hi, how may I help you? (runs whole script)
I had thought about looping through a piece of code every 5 seconds and then connecting to Google API but this isn't possible as the API is limited to 50 requests per day.
Any help is appreciated,
Thanks in advance
You can use "Silence" threshold to identify need of sending request to google, with that approach you will avoid sending to match requests. For code sample see Python record audio on detected sound.
Alternatively you can use open sourced speech recognition packages and end up with independent application, see The Ultimate Guide To Speech Recognition With Python article for that approach.
However, if you still prefer using of the remote API, you can combine approaches above, and use SpeechRecognition to understand the Hey, Robot phrase and after that, switch application to use Google API for speech recognition for some small short period of time, of course the threshold check shall be used to avoid querying Google API when client don't continue to speak after saying Hey, Robot.
Good Luck !
Go with CMU Sphinx. It does exactly what you want. See here:
https://cmusphinx.github.io/wiki/

Working with iTunes COM interface dates in Python

Switching from Javascript to Python for scripting iTunes via the COM interface on Windows and am having some confusion with iTunes dates.
Trying to check songs to see which have been added since the last time the script ran and can't seem to figure out how to do that comparison. Googling around for a couple hours hasn't enabled me to make any progress. Javascript had some tricky iTunes date conversion issues so maybe it's similar weirdness, or perhaps I'm just making a noob Python mistake (sorry about that!).
When I print the DateAdded return's type with the type function I get "time" but I can't seem to use any time functions to accomplish my aim. For the song I'm working with for testing, the DateAdded variable prints out as "02/24/18 20:52:02" which is indeed the song's correct date added value. Not sure what additional information might be useful to you if it is an odd iTunes conversion issue, but am more than happy to provide any you request.
Thanks very much.

scraping a subscribed website for video links

I use Kodi with add-ons such as Exodus which allow me to load episodes of my favourite TV programs etc, and I also have a subscription to horse and country to watch equine based shows but there is not a horse and country add-on to allow me to watch these on Kodi.
Is it possible for me to be able to code an add-on for Kodi (presumably in Python?) that would obtain all of the possible video links from www.horseandcountry.tv (catch up and on demand) using my log-in details and list these for me to watch.
I have a fair bit of experience coding (mostly Java, and a little Python), but have never written a Kodi add-on or done anything that scrapes video links from websites etc. I'm a first year computer science student so have a bit of understanding but not much experience!
First off, is what I am looking to do realistic and possible? and secondly, if so, would someone be able to give a very brief overview of how I would go about it and the necessary principles involved?
Your going to write a python addon, in this case probably a plugin is fitted best.
Have a look at https://github.com/Razzeee/generator-kodi for a good quickstart/boilerplate. (Let me know if you spot something wrong)
You might also want to use beautifulsoup to grab the links via python.

Categories