TTS MultiLingual
1.0.0
pip install TTS모델을 코딩하거나 훈련하려는 경우 TTS를 복제하고 로컬로 설치하십시오.
git clone https://github.com/saba99/TTS-MultiLingual
pip install -e .[all,dev,notebooks] # Select the relevant extrasUbuntu (Debian)에있는 경우 설치를 위해 다음 명령을 따라 실행할 수도 있습니다.
$ make system-deps # intended to be used on Ubuntu (Debian). Let us know if you have a different OS.
$ make install from TTS . api import TTS
# Running a multi-speaker and multi-lingual model
# List available TTS models and choose the first one
model_name = TTS . list_models ()[ 0 ]
# Init TTS
tts = TTS ( model_name )
# Run TTS
# Since this model is multi-speaker and multi-lingual, we must set the target speaker and the language
# Text to speech with a numpy output
wav = tts . tts ( "This is a test! This is also a test!!" , speaker = tts . speakers [ 0 ], language = tts . languages [ 0 ])
# Text to speech to a file
tts . tts_to_file ( text = "Hello world!" , speaker = tts . speakers [ 0 ], language = tts . languages [ 0 ], file_path = "output.wav" )
# Running a single speaker model
# Init TTS with the target model name
tts = TTS ( model_name = "tts_models/de/thorsten/tacotron2-DDC" , progress_bar = False , gpu = False )
# Run TTS
tts . tts_to_file ( text = "Ich bin eine Testnachricht." , file_path = OUTPUT_PATH )
# Example voice cloning with YourTTS in English, French and Portuguese:
tts = TTS ( model_name = "tts_models/multilingual/multi-dataset/your_tts" , progress_bar = False , gpu = True )
tts . tts_to_file ( "This is voice cloning." , speaker_wav = "my/cloning/audio.wav" , language = "en" , file_path = "output.wav" )
tts . tts_to_file ( "C'est le clonage de la voix." , speaker_wav = "my/cloning/audio.wav" , language = "fr-fr" , file_path = "output.wav" )
tts . tts_to_file ( "Isso é clonagem de voz." , speaker_wav = "my/cloning/audio.wav" , language = "pt-br" , file_path = "output.wav" )
# Example voice conversion converting speaker of the `source_wav` to the speaker of the `target_wav`
tts = TTS ( model_name = "voice_conversion_models/multilingual/vctk/freevc24" , progress_bar = False , gpu = True )
tts . voice_conversion_to_file ( source_wav = "my/source.wav" , target_wav = "my/target.wav" , file_path = "output.wav" )
# Example voice cloning by a single speaker TTS model combining with the voice conversion model. This way, you can
# clone voices by using any model in TTS.
tts = TTS ( "tts_models/de/thorsten/tacotron2-DDC" )
tts . tts_with_vc_to_file (
"Wie sage ich auf Italienisch, dass ich dich liebe?" ,
speaker_wav = "target/speaker.wav" ,
file_path = "ouptut.wav"
)
# Example text to speech using [Coqui Studio](https://coqui.ai) models. You can use all of your available speakers in the studio.
# [Coqui Studio](https://coqui.ai) API token is required. You can get it from the [account page](https://coqui.ai/account).
# You should set the `COQUI_STUDIO_TOKEN` environment variable to use the API token.
# If you have a valid API token set you will see the studio speakers as separate models in the list.
# The name format is coqui_studio/en/<studio_speaker_name>/coqui_studio
models = TTS (). list_models ()
# Init TTS with the target studio speaker
tts = TTS ( model_name = "coqui_studio/en/Torcull Diarmuid/coqui_studio" , progress_bar = False , gpu = False )
# Run TTS
tts . tts_to_file ( text = "This is a test." , file_path = OUTPUT_PATH )
# Run TTS with emotion and speed control
tts . tts_to_file ( text = "This is a test." , file_path = OUTPUT_PATH , emotion = "Happy" , speed = 1.5 )| 짧은 예 | 짧은 예 | 짧은 예 |
무지개 .mp4 | Windy.mp4 | Windy-2.mp4 |
| 무지개는 빛의 반사, 굴절 및 분산으로 인한 기상 현상입니다. | 운전자는 그의 교훈을 배웠다. 그는 다시는 바람에서 운전하지 않을 것입니다 | 외부 사람들은 구부리고 있습니다. 바람은 걷기가 어렵습니다 |
| 긴 예 | 긴 예 | 긴 예 |
an.apple.pie.mp4 | cat.and.a.dog.mp4 | .farmer.mp4 |
| 나무는 붉은 사과로 가득 차있었습니다. 농부는 갈색 말을 타고있었습니다. 그는 나무 아래에서 멈췄다. 그는 손을 내밀어 사과를 지사에서 골랐다. 그는 생 사과에 물었다. 그는 사과를 즐겼다. 그의 말은 그를 바라보기 위해 머리를 돌렸다. 농부는 나무에서 또 다른 사과를 골랐다. 그는 그것을 말에 주었다. 말은 생 사과를 먹었습니다. 말은 사과를 즐겼습니다. 농부는 12 명의 사과를 가방에 넣었습니다. 그는 말을 집으로 탔다. 그는 말을 헛간에 넣었다. 그는 그의 집으로 걸어 갔다. 고양이는 다리에 문지르고있었습니다. 그는 고양이에게 따뜻한 우유 한 그릇을 주었다. /td> | 검은 고양이가 의자 위로 뛰어 들었다. 그것은 흰 개를 내려다 보았다. 개는 뼈를 씹고있었습니다. 고양이는 개 위로 뛰어 들었다. 개는 계속 뼈를 씹고있었습니다. 고양이는 강아지의 꼬리를 가지고 놀았습니다. 개는 계속 뼈를 씹고있었습니다. 고양이는 의자 위로 뛰어 들었다. 발을 핥기 시작했습니다. 개가 일어났다. 그것은 고양이를 보았다. 고양이의 모피를 핥았습니다. 고양이는 강아지의 코를 핥았습니다. 개는 뼈로 돌아갔습니다. 소년이 방을 뚫고 달렸다. 그는 노란 셔츠를 입고 있었다. 그는 거의 의자에 뛰어 들었다. 고양이는 의자에서 뛰어 내렸다. 고양이는 소파 위로 뛰어 들었다. | 농부는 트랙터를 운전합니다. 트랙터는 땅을 파헤칩니다. 그는 땅에 노란 옥수수를 심습니다. 그는 봄에 노란색 옥수수를 심습니다. 옥수수는 여름에 자랍니다. 비는 옥수수가 자라는 데 도움이됩니다. 비가 없으면 옥수수가 죽습니다. 비가 많이 있다면 옥수수가 많이 있습니다. 그는 늦은 여름에 노란 옥수수를 수확합니다. 그는 야채 스탠드에서 옥수수를 판매합니다. 그는 귀를 25 센트로 판매합니다. 그는 4 개의 귀를 $ 1에 판매합니다. 그는 단 한 달 만에 모든 옥수수를 판매합니다. 이웃은 그의 옥수수를 좋아합니다. 옥수수는 신선합니다. 밝은 노란색입니다. 맛있습니다. 맛있어요. 새들도 그의 옥수수를 좋아합니다. 그들은 그것을 지불하지 않습니다. 그들은 현장에있는 동안 그것을 먹습니다 |
| 다국어 지원 : 영어 | 다국어 지원 : 프랑스어 | 다국어 지원 : 네덜란드 |
비. and.Hail.mp4 | fr-rain.and.hail.mp4 | nl-rain.and.hail.mp4 |
| 어두운 구름이 하늘에있었습니다. 태양이 내려 갔다. 날씨가 추워졌습니다. 바람이 불기 시작했습니다. 잎이 나무에서 날아 갔다. 종이는 공중을 통해 날아 갔다. 사람들은 재킷을 버튼했습니다. 비가 떨어지기 시작했습니다. 처음에는 조용했습니다. 그런 다음 더 커졌습니다 | un arcoíris o arco iris es un fenómeno Óptico y meteorológico que는 en el cielo de un arco de luz multicolor | Een Regenboog는 Een Gekleurde Cirkelboog Die aan de Hemel Waargenomen Kan Worden Als de, Laagstaande |
tts 제공된 모델 목록 :
$ tts --list_models
모델 정보 가져 오기 (tts_models 및 vocoder_models 모두) :
```
$ tts --model_info_by_name tts_models/tr/common-voice/glow-tts
```
```
$ tts --model_info_by_name vocoder_models/en/ljspeech/hifigan_v2
```
기본 모델로 TTS 실행 :
예를 들어:
$ tts --text "Text for TTS" --model_name "tts_models/en/ljspeech/glow-tts" --out_path output/path/speech.wav
자신의 멀티 스피커 TTS 모델을 실행하십시오.
$ tts --text "Text for TTS" --out_path output/path/speech.wav --model_path path/to/model.pth --config_path path/to/config.json --speakers_file_path path/to/speaker.json --speaker_idx <speaker_id>
|- notebooks/ (Jupyter Notebooks for model evaluation, parameter selection and data analysis.)
|- utils/ (common utilities.)
|- TTS
|- bin/ (folder for all the executables.)
|- train*.py (train your target model.)
|- ...
|- tts/ (text to speech models)
|- layers/ (model layer definitions)
|- models/ (model definitions)
|- utils/ (model specific utilities.)
|- speaker_encoder/ (Speaker Encoder models.)
|- (same)
|- vocoder/ (Vocoder models.)
|- (same)