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
File size: 800 Bytes
e90767c | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | 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",
]
|