lowerquality / gentle

gentle forced aligner
https://lowerquality.com/gentle/
MIT License
1.42k stars 293 forks source link

Help wanted: Using Gentle with my own data/models #113

Open migueljette opened 7 years ago

migueljette commented 7 years ago

Hi,

Do you have pointers on how to use Gentle with my own models? I have built Kaldi models with my own data (created my own recipe following Librispeech) and now I would like to test Gentle with my own model. Where do I get the files from PROTO_LANGDIR/ and data/?

Thanks for your help and direction!

migueljette commented 7 years ago

Hi @strob any chance you can help me understand? From a Kaldi recipe perspective, which scripts should I run to get models to work within your framework? Thank you so much!!

migueljette commented 7 years ago

or maybe @ronen has an idea. I just pulled your "dev" branch for gentle and it handles different "sample rate". So I imagine you figured out how to use different models with gentle. :) Thanks guys!

nshmyrev commented 7 years ago

You need nnet2 online model, in librispeech recipe you need to reach this part

# # The following is the current online-nnet2 recipe, with "multi-splice".
# local/online/run_nnet2_ms.sh

then you simply replace the files in gentle models with the files of the same name from your model and you adjust the paths.

nshmyrev commented 7 years ago

You will also have to update some sources, like this part must be changed:

  config.silence_phones = "1:2:3:4:5:6:7:8:9:10:11:12:13:14:15:16:17:18:19:20";
ronen commented 7 years ago

@migueljette

or maybe @ronen has an idea. I just pulled your "dev" branch for gentle and it handles different "sample rate". So I imagine you figured out how to use different models with gentle. :)

Sorry I haven't... I made that change in anticipation of trying to figure it out, but haven't looked into it yet. In fact if you or @nshmyrev or @strob could point to some sort of instructions/help/tutorial for how to go about fiddling with or replacing the model that would be great. Thanks!

migueljette commented 7 years ago

Hi, I'll try to figure it out now. I am running the run_nnet2_ms.sh recipe as I write this. Hopefully, it'll be done by next week and I can try this out with my own models. I'll write back if I make it work!

migueljette commented 7 years ago

Hi there,

By the way, I was able to make this work. I had to update the folders "data" "PROTO_LANGDIR" with my own models (from run_nnet2_ms.sh)

I also had to update a few of the files in: "ext". Mostly "standard_kaldi.cc" where you have to give the name of a few of the files and also define which phonemes are silence phonemes. It would be nice to make this a bit more configurable in the future. If I have some time, I will make it so. For now, it works! This tool is awesome!

strob commented 7 years ago

Hey, @migueljette -- this is thrilling!

I'd love for any tips you're willing to disclose. I would very much like to support a repository of different pre-compiled language models that people can use with Gentle.

yifan commented 7 years ago

I have a pull request to make it easier to use custom models here: https://github.com/lowerquality/gentle/pull/140

attitudechunfeng commented 6 years ago

Hi, @migueljette. Could you show more details about the process of replacing custom models by steps?