Xenova HF staff commited on
Commit
ddfc002
·
verified ·
1 Parent(s): 66bb165

Update to Transformers.js v3

Browse files
Files changed (1) hide show
  1. README.md +4 -4
README.md CHANGED
@@ -310,12 +310,12 @@ make -j && ./main -m models/ggml-large-32-2.en.bin -f samples/jfk.wav
310
  ### Transformers.js
311
 
312
  ```js
313
- import { pipeline } from '@xenova/transformers';
314
 
315
- let transcriber = await pipeline('automatic-speech-recognition', 'distil-whisper/distil-large-v2');
316
 
317
- let url = 'https://huggingface.co/datasets/Xenova/transformers.js-docs/resolve/main/jfk.wav';
318
- let output = await transcriber(url);
319
  // { text: " And so, my fellow Americans, ask not what your country can do for you. Ask what you can do for your country." }
320
  ```
321
 
 
310
  ### Transformers.js
311
 
312
  ```js
313
+ import { pipeline } from '@huggingface/transformers';
314
 
315
+ const transcriber = await pipeline('automatic-speech-recognition', 'distil-whisper/distil-large-v2');
316
 
317
+ const url = 'https://huggingface.co/datasets/Xenova/transformers.js-docs/resolve/main/jfk.wav';
318
+ const output = await transcriber(url);
319
  // { text: " And so, my fellow Americans, ask not what your country can do for you. Ask what you can do for your country." }
320
  ```
321