Giter Club home page Giter Club logo

Comments (8)

Charlottecuc avatar Charlottecuc commented on August 12, 2024

You shouldn't put hanzi characters in train.txt, and it will be better if you transform the pinyin sequences into phoneme sequences as in Mandarin TTS projects (e.g. kan4-> k an4) because there are too many unique pinyins in Mandarin.

from auxiliaryasr.

yl4579 avatar yl4579 commented on August 12, 2024

I believe it should be like SSB06930002.wav | wu shu shi zhong bei kan zuo wo guo de guo cui | 0. You don't want the tones (that should be handled by the F0 model) nor the Chinese characters (they aren't phonemes) here. The ASR model should only be used for phonemes.

from auxiliaryasr.

MMMMichaelzhang avatar MMMMichaelzhang commented on August 12, 2024

Thanks ,it helps a lot!!! I am still confused about dict.txt for mandarin.my fomart is like this:
"a",1
"ao",2
"an",3
"w",4
"t",5
"d",6
"n",7
or:
“wa”,1
"ta",2
"na",3
"tao",4
"dao",5
"wan",6
"tan",7
which one should i use? @yl4579 @Charlottecuc

from auxiliaryasr.

MMMMichaelzhang avatar MMMMichaelzhang commented on August 12, 2024

I use g2pM as phonemizer,

sentence = "然而,他红了20年以后,他竟退出了大家的视线。"
model(sentence, tone=False, char_split=False)
['ran', 'er', ',', 'ta', 'hong', 'le', '2', '0', 'nian', 'yi', 'hou', ',', 'ta', 'jing', 'tui', 'chu', 'le', 'da', 'jia', 'de', 'shi', 'xian', '。']
so the dict.txt 's format should be like this?
“wa”,1
"ta",2
"na",3
"tao",4
"dao",5
"wan",6
"tan",7
@yl4579 @Charlottecuc

from auxiliaryasr.

Charlottecuc avatar Charlottecuc commented on August 12, 2024

I use g2pM as phonemizer,

sentence = "然而,他红了20年以后,他竟退出了大家的视线。"
model(sentence, tone=False, char_split=False)
['ran', 'er', ',', 'ta', 'hong', 'le', '2', '0', 'nian', 'yi', 'hou', ',', 'ta', 'jing', 'tui', 'chu', 'le', 'da', 'jia', 'de', 'shi', 'xian', '。']
so the dict.txt 's format should be like this?
“wa”,1
"ta",2
"na",3
"tao",4
"dao",5
"wan",6
"tan",7
@yl4579 @Charlottecuc

Thanks ,it helps a lot!!! I am still confused about dict.txt for mandarin.my fomart is like this: "a",1 "ao",2 "an",3 "w",4 "t",5 "d",6 "n",7 or: “wa”,1 "ta",2 "na",3 "tao",4 "dao",5 "wan",6 "tan",7 which one should i use? @yl4579 @Charlottecuc

I use the first type of format (which is quite common when training Mandarin TTS models) because I don't want too many tokens in my dictionary . Besides, I suggest you transform "20" to "er sh i" in this context.

from auxiliaryasr.

Moonmore avatar Moonmore commented on August 12, 2024

I believe it should be like SSB06930002.wav | wu shu shi zhong bei kan zuo wo guo de guo cui | 0. You don't want the tones (that should be handled by the F0 model) nor the Chinese characters (they aren't phonemes) here. The ASR model should only be used for phonemes.

@yl4579 I would like to ask if tones information is not added to the asr model training, then how to align the text encoder and mel. For example: (你好 ->ni3 hao3 -> n i3 h ao3), (n i h ao).

from auxiliaryasr.

yl4579 avatar yl4579 commented on August 12, 2024

@Moonmore You do not need tones for this. The pre-trained aligner in StyleTTS and StyleTTS 2 repo was already trained on Mandarin (AiShell) without tones. The conversion table between IPA and pinyin is here: yl4579/StyleTTS#10 (comment)
Once you use this table to convert pinyin to IPA, you can directly use the pre-trained aligner and you don't need to train it yourself. However, if you want to train it yourself on pinyin, you do not need to include tones.

from auxiliaryasr.

Moonmore avatar Moonmore commented on August 12, 2024

@Moonmore You do not need tones for this. The pre-trained aligner in StyleTTS and StyleTTS 2 repo was already trained on Mandarin (AiShell) without tones. The conversion table between IPA and pinyin is here: yl4579/StyleTTS#10 (comment) Once you use this table to convert pinyin to IPA, you can directly use the pre-trained aligner and you don't need to train it yourself. However, if you want to train it yourself on pinyin, you do not need to include tones.

@yl4579 thanks for your reply. I successfully used pinyin to train the model.

from auxiliaryasr.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.