import gradio as gr from gradio_client import Client splt_client = Client("https://fffiloni-splittrack2musicgen.hf.space/") #whisper_client = Client("https://sanchit-gandhi-whisper-jax.hf.space/") whisper_client = Client("https://sanchit-gandhi-whisper-large-v2.hf.space/") import re def format_lyrics(text): # Use regex to find parts that start with a capital letter and insert a newline formatted_text = re.sub(r'(?

Song To Lyrics

Send the audio file of your favorite song, and get the lyrics !
Under the hood, we split and get the vocals track from the audio file, then send the vocals to Whisper.

""") song_in = gr.Audio(label="Song input", type="filepath", source="upload") getlyrics_btn = gr.Button("Get Lyrics !") vocals_out = gr.Audio(label="Vocals Only") lyrics_res = gr.Textbox(label="Lyrics") getlyrics_btn.click(fn=infer, inputs=[song_in], outputs=[vocals_out, lyrics_res]) demo.queue().launch()