I was just wondering if its possible to get the lyrics from a roblox audio from a script.
No. You will have to manually generate them or develop some sort of lyric detecting technology.
The only way to do this would be manually. Unfortunately this is extremely hard to do in the first place, even without the restraints of the small amount of sound data roblox gives us.
The only audio data roblox gives you is the peek volume, which is nowhere near enough data to patch together lyrics from a sound. You would need complex audio reading to accomplish speech recognition.
This would be really cool if it was possible though!
Iâm just going to point this out -
You could make some kind of web GET request to a website if all of the lyrical content is in plaintext and all in one place.
This is true actually, but it would be quite a task.
You would need to:
-
Send a request to a custom web program
-
Have that web app steal the Audio file off the site
-
Encode and send it to a speech recognition site( if of course you can find one that works well at all )
-
Receive the response text
-
Return it to roblox
This probably would be possible using some kind of speech recognition website, but it would definitely be complicated.
I really donât think this would work well at all with the current state of our voice processing APIâs. Apps like Siri can do a halfway decent job of understanding voices, but that is without any background sounds or music.
Really glad you pointed out that that was an option though!
No, not stealing. Web request to a custom website to read raw HTML text. Thatâs why I said as long as itâs all together and plaintext.
We borrow here
we donât steal.
A songâs lyrics are not stored in itâs page HTML unless I am mistaken, so you would have to download the file off robloxâs servers, and then have the audio file get read by a separate program.
You are right that you would only need to borrow the sound file, though. Hopefully it wouldnât be against TOS, since when you upload something to roblox you are technically open sourcing it anyway.
I also have seen multiple browser extensions allow you to download files from their pages.
Yes, itâs:
local Lyrics = Sound:GetGeneratedLyrics()
It returns a table of booleans converted to ARGB hex values.ââ
Edit: Let me know what happens, not tested,
Is this supposed to be lua code? I searched all over the Internet, but did not find a function with this name.
Thatâs not going to work. Speech to text is iffy enough when you have nice clear dictation, it canât reliably transcribe pop music. Find some hip hop on Youtube and turn on Close Captioning, the results are often hilarious bad. The only viable solution would be to use a service that can recognize the song, together with a database of lyrics. None of this is worth doing for a Roblox game IMO, it would involve multiple services youâd have to pay for, a lot of web site work to glue it all together, and even if you got it working, it would still only work some of the time. Not the sort of thing that is likely to pay for itself on this platform.
Thatâs why I originally commented it not being possible. It would be a mighty monstrous stretch to try and make something like this work consistently at all( at least with our current voice recognition NNâs ), and using a Shazam-like song recognizing program would be a pain.
Other than possibly break tags, all of it can be grabbed from raw HTML.
Can you demonstrate how to do this? I have never been informed that this is possible.
Itâs trollua.
On a serious note, the only logical way is to have a script that contains the lyrics typed manually. Then, you have to map the TimePositions in the audio to the lyrics. It can all be done by a dictionary. For example:
MyTrollSongName =
{
0 = âThis is my first line in the songâ,
7 = âThis line is 7 seconds after the firstâ
}
Then youâd have an if statement as such:
local Lyrics = MyTrollSongName[Math to determine key/value to use according to TimePosition]
If you really want to look into it, you can also try some sort of HTTP request. But Iâm too tired to get into that. Good luck!
Saw this years ago, this is what I always used as a reference.
The problem is that the source of a webpage does not contain any trace of lyrics, unless they were manually inserted for some reason.
Of course you can read whatever you want from the HTML source of a page. This is only of use if it contains what you want though.
The source of the profile pages for roblox audio files, do not contain the lyrics within the audio.
Webpage parsing is useful in many cases, but this isnât one of them unfortunately.
The point is, itâs possible, youâd probably have to mess around with some switches.
Your client does not see the real source code so it doesnât matter if it was manually inserted or not. Your system could read raw paragraphs and text from an HTML document.
Here is an example:

This is pure HTML so it can be read using the example link. It doesnât matter if someone manually put this here or not. It can still be read.