README.md
4.2 KB · 104 lines · markdown Raw
1 ---
2 license: other
3 license_name: coqui-public-model-license
4 license_link: https://coqui.ai/cpml
5 library_name: coqui
6 pipeline_tag: text-to-speech
7 widget:
8 - text: "Once when I was six years old I saw a magnificent picture"
9 ---
10
11 # ⓍTTS
12 ⓍTTS is a Voice generation model that lets you clone voices into different languages by using just a quick 6-second audio clip. There is no need for an excessive amount of training data that spans countless hours.
13
14 This is the same or similar model to what powers [Coqui Studio](https://coqui.ai/) and [Coqui API](https://docs.coqui.ai/docs).
15
16 ### Features
17 - Supports 17 languages.
18 - Voice cloning with just a 6-second audio clip.
19 - Emotion and style transfer by cloning.
20 - Cross-language voice cloning.
21 - Multi-lingual speech generation.
22 - 24khz sampling rate.
23
24 ### Updates over XTTS-v1
25 - 2 new languages; Hungarian and Korean
26 - Architectural improvements for speaker conditioning.
27 - Enables the use of multiple speaker references and interpolation between speakers.
28 - Stability improvements.
29 - Better prosody and audio quality across the board.
30
31 ### Languages
32 XTTS-v2 supports 17 languages: **English (en), Spanish (es), French (fr), German (de), Italian (it), Portuguese (pt),
33 Polish (pl), Turkish (tr), Russian (ru), Dutch (nl), Czech (cs), Arabic (ar), Chinese (zh-cn), Japanese (ja), Hungarian (hu), Korean (ko)
34 Hindi (hi)**.
35
36 Stay tuned as we continue to add support for more languages. If you have any language requests, feel free to reach out!
37
38 ### Code
39 The [code-base](https://github.com/coqui-ai/TTS) supports inference and [fine-tuning](https://tts.readthedocs.io/en/latest/models/xtts.html#training).
40
41 ### Demo Spaces
42 - [XTTS Space](https://huggingface.co/spaces/coqui/xtts) : You can see how model performs on supported languages, and try with your own reference or microphone input
43 - [XTTS Voice Chat with Mistral or Zephyr](https://huggingface.co/spaces/coqui/voice-chat-with-mistral) : You can experience streaming voice chat with Mistral 7B Instruct or Zephyr 7B Beta
44
45 | | |
46 | ------------------------------- | --------------------------------------- |
47 | 🐸💬 **CoquiTTS** | [coqui/TTS on Github](https://github.com/coqui-ai/TTS)|
48 | 💼 **Documentation** | [ReadTheDocs](https://tts.readthedocs.io/en/latest/)
49 | 👩‍💻 **Questions** | [GitHub Discussions](https://github.com/coqui-ai/TTS/discussions) |
50 | 🗯 **Community** | [Discord](https://discord.gg/5eXr5seRrv) |
51
52
53 ### License
54 This model is licensed under [Coqui Public Model License](https://coqui.ai/cpml). There's a lot that goes into a license for generative models, and you can read more of [the origin story of CPML here](https://coqui.ai/blog/tts/cpml).
55
56 ### Contact
57 Come and join in our 🐸Community. We're active on [Discord](https://discord.gg/fBC58unbKE) and [Twitter](https://twitter.com/coqui_ai).
58 You can also mail us at info@coqui.ai.
59
60 Using 🐸TTS API:
61
62 ```python
63 from TTS.api import TTS
64 tts = TTS("tts_models/multilingual/multi-dataset/xtts_v2", gpu=True)
65
66 # generate speech by cloning a voice using default settings
67 tts.tts_to_file(text="It took me quite a long time to develop a voice, and now that I have it I'm not going to be silent.",
68 file_path="output.wav",
69 speaker_wav="/path/to/target/speaker.wav",
70 language="en")
71
72 ```
73
74 Using 🐸TTS Command line:
75
76 ```console
77 tts --model_name tts_models/multilingual/multi-dataset/xtts_v2 \
78 --text "Bugün okula gitmek istemiyorum." \
79 --speaker_wav /path/to/target/speaker.wav \
80 --language_idx tr \
81 --use_cuda true
82 ```
83
84 Using the model directly:
85
86 ```python
87 from TTS.tts.configs.xtts_config import XttsConfig
88 from TTS.tts.models.xtts import Xtts
89
90 config = XttsConfig()
91 config.load_json("/path/to/xtts/config.json")
92 model = Xtts.init_from_config(config)
93 model.load_checkpoint(config, checkpoint_dir="/path/to/xtts/", eval=True)
94 model.cuda()
95
96 outputs = model.synthesize(
97 "It took me quite a long time to develop a voice and now that I have it I am not going to be silent.",
98 config,
99 speaker_wav="/data/TTS-public/_refclips/3.wav",
100 gpt_cond_len=3,
101 language="en",
102 )
103 ```
104