Walleclipse / Deep_Speaker-speaker_recognition_system

Keras implementation of ‘’Deep Speaker: an End-to-End Neural Speaker Embedding System‘’ (speaker recognition)
247 stars 81 forks source link

question about run and dataset #1

Closed qianbudiao6 closed 4 years ago

qianbudiao6 commented 5 years ago

Hello, I am currently researching speaker recognition. I think your code is very valuable. I want to run it for learning. How can I run this code? How can I get an eer and accuracy image as shown below? Is it possible to provide a tutorial like this.... Besides, can you share a link to the speech library you are using to implement this code? thank you~

Walleclipse commented 5 years ago

I am apologize that I just saw the issues.

  1. preprare data. You want to prepare the data just as Librispeech Data format or KALDI data format. Please check folder audio/LibriSpeechSamples/train-clean-100 . Folder was named by speaker name, and each speaker contains some .wav audios
  2. If you data is kaldi format just run python kaldi_form_preprocess.py , If data format similar to Librispeech Data just run python preprocess.py
  3. python train.py to training your model . Model is defined in model.py. EER during training will be saved。
  4. use utils.py to plot_loss_acc.
  5. I am sorry. I am not quite understant of your last question "speech library you are using to implement this code?"
Hard-working-bee commented 5 years ago

你好,我在运行你代码的时候,发现train.py是个死循环呀,一直在训练,没有终止` ![image](https://user-images.githubusercontent.com/33196678/60271000-1dd6ce80-9924-11e9-81e2-1fdeeb2aa503.png) ,但我在while true之后加上#if grad_steps>3000:

break`

之后,重新运行train.py错误率为0。还有最后readme里面的图像怎么画的呀

izhangy commented 4 years ago

您好,在复现您的程序的时候,运行units.py之后没有任何结果出来是怎么回事? train.py训练结束以后,也没有checkpoint保存,请问是哪里出错了吗?

Walleclipse commented 4 years ago

你好,我在运行你代码的时候,发现train.py是个死循环呀,一直在训练,没有终止` ![image](https://user-images.githubusercontent.com/33196678/60271000-1dd6ce80-9924-11e9-81e2-1fdeeb2aa503.png) ,但我在while true之后加上#if grad_steps>3000: #break` 之后,重新运行train.py错误率为0。还有最后readme里面的图像怎么画的呀

Walleclipse commented 4 years ago

你好,我在运行你代码的时候,发现train.py是个死循环呀,一直在训练,没有终止` ![image](https://user-images.githubusercontent.com/33196678/60271000-1dd6ce80-9924-11e9-81e2-1fdeeb2aa503.png) ,但我在while true之后加上#if grad_steps>3000: #break` 之后,重新运行train.py错误率为0。还有最后readme里面的图像怎么画的呀

1)首先,你训练的步数太少了,一般训练10,000步以上。然后你可能只用了我给的sample data,这个数据少,并且训练和测试用了同一个数据,所以错误率为0。你需要从 LibriSpeech 下载完整的数据。 2)Readme 里的图通过调用 utils.py 里面的 def plot_loss 来画

Walleclipse commented 4 years ago

您好,在复现您的程序的时候,运行units.py之后没有任何结果出来是怎么回事? train.py训练结束以后,也没有checkpoint保存,请问是哪里出错了吗?

1)Readme 里的图通过调用 utils.py 里面的 def plot_loss 来画 e.g.

import constants as c
from utils import plot_loss
loss_file=c.CHECKPOINT_FOLDER+'/losses.txt' # loss file path
plot_loss(loss_file)

2) 没有checkpoint保存是因为可能没有到保存的步数,你就停止了程序。默认情况下c.SAVE_PER_EPOCHS=200, 你可以在constants.py 里减少 SAVE_PER_EPOCHS,从而让该程序早点保存checkpoint