Skip to content

Commit ad12891

Browse files
committed
Add import to sample code
1 parent 46c8320 commit ad12891

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/pipelines/text-to-audio.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ import { AutoModel } from '../models.js';
4141
*
4242
* **Example:** Generate audio from text with `onnx-community/Supertonic-TTS-ONNX`.
4343
* ```javascript
44+
* import { pipeline } from '@huggingface/transformers';
45+
*
4446
* const synthesizer = await pipeline('text-to-speech', 'onnx-community/Supertonic-TTS-ONNX');
4547
* const speaker_embeddings = 'https://huggingface.co/onnx-community/Supertonic-TTS-ONNX/resolve/main/voices/F1.bin';
4648
* const output = await synthesizer('Hello there, how are you doing?', { speaker_embeddings });
@@ -55,6 +57,8 @@ import { AutoModel } from '../models.js';
5557
*
5658
* **Example:** Multilingual speech generation with `Xenova/mms-tts-fra`. See [here](https://huggingface.co/models?pipeline_tag=text-to-speech&other=vits&sort=trending) for the full list of available languages (1107).
5759
* ```javascript
60+
* import { pipeline } from '@huggingface/transformers';
61+
*
5862
* const synthesizer = await pipeline('text-to-speech', 'Xenova/mms-tts-fra');
5963
* const output = await synthesizer('Bonjour');
6064
* // RawAudio {

0 commit comments

Comments
 (0)