Text-to-Speech
Transformers
PyTorch
Persian
moss_tts_nano
feature-extraction
persian
farsi
tts
voice-cloning
speech-synthesis
custom_code
Instructions to use nimaaaAI/MOSS-TTS-Nano-Persian with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use nimaaaAI/MOSS-TTS-Nano-Persian with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-to-speech", model="nimaaaAI/MOSS-TTS-Nano-Persian", trust_remote_code=True)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("nimaaaAI/MOSS-TTS-Nano-Persian", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
| from .configuration_moss_tts_nano import MossTTSNanoConfig | |
| from .modeling_moss_tts_nano import ( | |
| MossTTSNanoForCausalLM, | |
| MossTTSNanoGenerationOutput, | |
| MossTTSNanoOutput, | |
| ) | |
| from .tokenization_moss_tts_nano import MossTTSNanoSentencePieceTokenizer | |
| try: | |
| MossTTSNanoConfig.register_for_auto_class() | |
| except Exception: | |
| pass | |
| for auto_class_name in ("AutoModel", "AutoModelForCausalLM"): | |
| try: | |
| MossTTSNanoForCausalLM.register_for_auto_class(auto_class_name) | |
| except Exception: | |
| pass | |
| try: | |
| MossTTSNanoSentencePieceTokenizer.register_for_auto_class("AutoTokenizer") | |
| except Exception: | |
| pass | |
| __all__ = [ | |
| "MossTTSNanoConfig", | |
| "MossTTSNanoForCausalLM", | |
| "MossTTSNanoSentencePieceTokenizer", | |
| "MossTTSNanoGenerationOutput", | |
| "MossTTSNanoOutput", | |
| ] | |