Instructions to use onnx-community/phonon-31m-en-ONNX with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers.js
How to use onnx-community/phonon-31m-en-ONNX with Transformers.js:
// npm i @huggingface/transformers import { pipeline } from '@huggingface/transformers'; // Allocate pipeline const pipe = await pipeline('text-to-speech', 'onnx-community/phonon-31m-en-ONNX'); - Pocket-TTS
How to use onnx-community/phonon-31m-en-ONNX with Pocket-TTS:
from pocket_tts import TTSModel import scipy.io.wavfile tts_model = TTSModel.load_model("onnx-community/phonon-31m-en-ONNX") voice_state = tts_model.get_state_for_audio_prompt( "hf://kyutai/tts-voices/alba-mackenna/casual.wav" ) audio = tts_model.generate_audio(voice_state, "Hello world, this is a test.") # Audio is a 1D torch tensor containing PCM data. scipy.io.wavfile.write("output.wav", tts_model.sample_rate, audio.numpy()) - Notebooks
- Google Colab
- Kaggle
update
#1
by Xenova HF Staff - opened
No description provided.
Xenova changed pull request title from [wip] use transformers config.json to update
nico-martin changed pull request status to merged