Text-to-Speech
Transformers
Safetensors
English
emotra_tts
feature-extraction
emotional-tts
emotion-transition
cosyvoice2
emotra-tts
custom_code
Instructions to use RetentionLabs/EmoTra-TTS with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use RetentionLabs/EmoTra-TTS with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-to-speech", model="RetentionLabs/EmoTra-TTS", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("RetentionLabs/EmoTra-TTS", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download config.json from RetentionLabs/EmoTra-TTS: direct link, hf CLI and curl.
- Browser
- Download file 5.78 kB
-
https://huggingface.co/RetentionLabs/EmoTra-TTS/resolve/main/config.json
- Command line
-
hf download hf://RetentionLabs/EmoTra-TTS/config.json
-
curl -L -o config.json https://huggingface.co/RetentionLabs/EmoTra-TTS/resolve/main/config.json
5.78 kB
| { | |
| "architectures": [ | |
| "EmoTraTTSForConditionalGeneration" | |
| ], | |
| "auto_map": { | |
| "AutoConfig": "configuration_emotra_tts.EmoTraTTSConfig", | |
| "AutoModel": "modeling_emotra_tts.EmoTraTTSForConditionalGeneration" | |
| }, | |
| "dtype": "bfloat16", | |
| "emotion_scale": 0.07, | |
| "emotion_transition_end": 0.7, | |
| "emotion_transition_start": 0.4, | |
| "estimator_channels": [ | |
| 256 | |
| ], | |
| "estimator_dropout": 0.0, | |
| "estimator_ffn_mult": 4, | |
| "estimator_group_norm_groups": 8, | |
| "estimator_head_dim": 64, | |
| "estimator_in_channels": 320, | |
| "estimator_num_blocks": 4, | |
| "estimator_num_decoding_left_chunks": -1, | |
| "estimator_num_heads": 8, | |
| "estimator_num_mid_blocks": 12, | |
| "estimator_out_channels": 80, | |
| "estimator_static_chunk_size": 50, | |
| "f0_predictor_hidden_size": 512, | |
| "flow_encoder_attention_dropout": 0.1, | |
| "flow_encoder_chunk_size": 25, | |
| "flow_encoder_dropout": 0.1, | |
| "flow_encoder_ffn_dim": 2048, | |
| "flow_encoder_hidden_act": "silu", | |
| "flow_encoder_hidden_size": 512, | |
| "flow_encoder_num_heads": 8, | |
| "flow_encoder_num_layers": 6, | |
| "flow_encoder_positional_dropout": 0.1, | |
| "flow_encoder_up_num_layers": 4, | |
| "flow_input_frame_rate": 25, | |
| "flow_input_size": 512, | |
| "flow_output_size": 80, | |
| "hidden_loss_weight": 0.1, | |
| "inference_cfg_rate": 0.7, | |
| "initializer_range": 0.02, | |
| "label_smoothing": 0.0, | |
| "length_normalized_loss": true, | |
| "length_regulator_sampling_ratios": [ | |
| 1, | |
| 1, | |
| 1, | |
| 1 | |
| ], | |
| "lm_attention_dropout": 0.0, | |
| "lm_chunk_size": 1, | |
| "lm_dropout": 0.1, | |
| "lm_ffn_dim": 4096, | |
| "lm_hidden_act": "relu", | |
| "lm_hidden_size": 896, | |
| "lm_input_projection_activation": true, | |
| "lm_num_heads": 16, | |
| "lm_num_layers": 14, | |
| "lm_positional_dropout": 0.1, | |
| "max_source_positions": 5000, | |
| "mix_ratio": [ | |
| 5, | |
| 15 | |
| ], | |
| "model_type": "emotra_tts", | |
| "noise_length": 15000, | |
| "noise_seed": 0, | |
| "num_flow_inference_steps": 10, | |
| "num_speech_special_tokens": 3, | |
| "num_vad_tokens": 5, | |
| "pre_lookahead_channels": 512, | |
| "pre_lookahead_len": 3, | |
| "sample_rate": 24000, | |
| "sigma_min": 1e-06, | |
| "speaker_embedding_dim": 192, | |
| "speech_tokenizer_conv_stride": 2, | |
| "speech_tokenizer_ffn_dim": 5120, | |
| "speech_tokenizer_fsmn_kernel_size": 31, | |
| "speech_tokenizer_fsq_levels": [ | |
| 3, | |
| 3, | |
| 3, | |
| 3, | |
| 3, | |
| 3, | |
| 3, | |
| 3 | |
| ], | |
| "speech_tokenizer_hidden_size": 1280, | |
| "speech_tokenizer_max_position_embeddings": 2048, | |
| "speech_tokenizer_max_source_positions": null, | |
| "speech_tokenizer_num_heads": 20, | |
| "speech_tokenizer_num_layers": 6, | |
| "speech_tokenizer_num_mel_bins": 128, | |
| "speech_tokenizer_rope_theta": 10000.0, | |
| "speech_vocab_size": 6561, | |
| "t_scheduler": "cosine", | |
| "text_config": { | |
| "architectures": [ | |
| "Qwen2ForCausalLM" | |
| ], | |
| "attention_dropout": 0.0, | |
| "bos_token_id": 151643, | |
| "dtype": "bfloat16", | |
| "eos_token_id": 151645, | |
| "hidden_act": "silu", | |
| "hidden_size": 896, | |
| "initializer_range": 0.02, | |
| "intermediate_size": 4864, | |
| "layer_types": [ | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention" | |
| ], | |
| "max_position_embeddings": 32768, | |
| "max_window_layers": 24, | |
| "model_type": "qwen2", | |
| "num_attention_heads": 14, | |
| "num_hidden_layers": 24, | |
| "num_key_value_heads": 2, | |
| "pad_token_id": null, | |
| "rms_norm_eps": 1e-06, | |
| "rope_parameters": { | |
| "rope_theta": 1000000.0, | |
| "rope_type": "default" | |
| }, | |
| "sliding_window": null, | |
| "tie_word_embeddings": true, | |
| "use_cache": true, | |
| "use_sliding_window": false, | |
| "vocab_size": 151936 | |
| }, | |
| "text_encoder_attention_dropout": 0.0, | |
| "text_encoder_chunk_size": 1, | |
| "text_encoder_dropout": 0.1, | |
| "text_encoder_ffn_dim": 4096, | |
| "text_encoder_hidden_act": "silu", | |
| "text_encoder_hidden_size": 1024, | |
| "text_encoder_input_size": 512, | |
| "text_encoder_num_heads": 16, | |
| "text_encoder_num_layers": 6, | |
| "text_encoder_positional_dropout": 0.1, | |
| "text_vocab_size": 51866, | |
| "token_mel_ratio": 2, | |
| "training_cfg_rate": 0.2, | |
| "transformers_version": "5.19.0", | |
| "vad_downsample_hidden_size": 256, | |
| "vad_dropout": 0.1, | |
| "vad_hidden_state_size": 1024, | |
| "vad_projection_hidden_size": 256, | |
| "vad_reconstructor_hidden_size": 512, | |
| "vocoder_audio_limit": 0.99, | |
| "vocoder_base_channels": 512, | |
| "vocoder_in_channels": 80, | |
| "vocoder_istft_hop_length": 4, | |
| "vocoder_istft_n_fft": 16, | |
| "vocoder_leaky_relu_slope": 0.1, | |
| "vocoder_mel_loss_coeff": 45.0, | |
| "vocoder_mel_loss_fmax": null, | |
| "vocoder_mel_loss_fmin": 0.0, | |
| "vocoder_mel_loss_hop_length": 480, | |
| "vocoder_mel_loss_n_fft": 1920, | |
| "vocoder_mel_loss_num_mel_bins": 80, | |
| "vocoder_mel_loss_win_length": 1920, | |
| "vocoder_num_harmonics": 8, | |
| "vocoder_resblock_dilation_sizes": [ | |
| [ | |
| 1, | |
| 3, | |
| 5 | |
| ], | |
| [ | |
| 1, | |
| 3, | |
| 5 | |
| ], | |
| [ | |
| 1, | |
| 3, | |
| 5 | |
| ] | |
| ], | |
| "vocoder_resblock_kernel_sizes": [ | |
| 3, | |
| 7, | |
| 11 | |
| ], | |
| "vocoder_source_amplitude": 0.1, | |
| "vocoder_source_noise_std": 0.003, | |
| "vocoder_source_resblock_dilation_sizes": [ | |
| [ | |
| 1, | |
| 3, | |
| 5 | |
| ], | |
| [ | |
| 1, | |
| 3, | |
| 5 | |
| ], | |
| [ | |
| 1, | |
| 3, | |
| 5 | |
| ] | |
| ], | |
| "vocoder_source_resblock_kernel_sizes": [ | |
| 7, | |
| 7, | |
| 11 | |
| ], | |
| "vocoder_upsample_kernel_sizes": [ | |
| 16, | |
| 11, | |
| 7 | |
| ], | |
| "vocoder_upsample_rates": [ | |
| 8, | |
| 5, | |
| 3 | |
| ], | |
| "vocoder_voiced_threshold": 10 | |
| } | |