This is the first post. Please forgive me, although there may be some points that cannot be reached. If you have any typographical errors, omissions, questions, suggestions for improvement, etc., please let us know.
--Cut vocals --Display a graph showing the pitch (DAM) --Scoring --Guide vocals (add a thin cut vocal)
--The one with lyrics (I can't find a good API ...) --Video is played (Youtube is difficult in terms of terms of use ... TextAlive embedding?) --Scoring criteria other than pitch such as vibrato and fist (honestly I can't tell the difference)
Installation of necessary libraries for the time being
Library to use
According to Introduction to Speech Analysis with Python [PyWorld, pyreaper], pyworld seems to work at high speed even if the speech is long. However, if it is too short, it will take time, so I'm thinking of calculating in real time with pyraper. I will compare it later.
For the time being, it seems that it can be realized around here, so I will add it each time I need something.
conda install -c conda-forge spleeter
conda install pyaudio
conda install pyQt5
conda install Qt
pip install pyworld
pip install pyreaper
Except for spleeter, I entered with conda or pip.
pyaoudio If you run the program in this article and you hear a sound, you are successful.
pyworld
Introduction to voice analysis with Python [PyWorld, pyreaper] If you put music in the program and get a graph, it's OK.
pyreaper
import pyreaper
import matplotlib.pyplot as plt
from scipy.io import wavfile
file = "music/spleetertest/test/vocals.wav"
fs, data = wavfile.read(file)
data = data[:int(1e6),0] #If it is too long, it will take time, so cut it appropriately.
data = data.copy(order='C') #If you don't do this you will get an error
pm_times, pm, f0_times, f0, corr = pyreaper.reaper(data, fs)
#graph display
plt.subplot(3,1,1)
plt.plot(pm_times, pm, linewidth=3, color="red", label="Pitch mark")
plt.legend(fontsize=10)
plt.subplot(3,1,2)
plt.plot(f0_times, f0, linewidth=3, color="green", label="F0 contour")
plt.legend(fontsize=10)
plt.subplot(3,1,3)
plt.plot(f0_times, corr, linewidth=3, color="blue", label="Correlations")
plt.legend(fontsize=10)
plt.show()
It is OK if such a graph appears
spleeter If you run the program in I tried spleeter and no error occurs, it's OK. It seems that mp3 is also okay.
I wish I could extract only vocal from music and convert it to a pitch graph.