Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -3,22 +3,17 @@ base_model: openai/whisper-tiny
|
|
| 3 |
library_name: transformers.js
|
| 4 |
---
|
| 5 |
|
|
|
|
|
|
|
| 6 |
If you haven't already, you can install the [Transformers.js](https://huggingface.co/docs/transformers.js) JavaScript library from [NPM](https://www.npmjs.com/package/@huggingface/transformers) using:
|
| 7 |
```bash
|
| 8 |
npm i @huggingface/transformers
|
| 9 |
```
|
| 10 |
|
| 11 |
-
https://huggingface.co/openai/whisper-tiny with ONNX weights to be compatible with Transformers.js.
|
| 12 |
-
|
| 13 |
```js
|
| 14 |
import { pipeline } from '@huggingface/transformers';
|
| 15 |
|
| 16 |
-
|
| 17 |
-
const transcriber = await pipeline('automatic-speech-recognition', 'Xenova/whisper-tiny', {
|
| 18 |
-
dtype: 'fp32', // Options: "fp32", "fp16", "q8", "q4"
|
| 19 |
-
});
|
| 20 |
-
|
| 21 |
-
// Use the model
|
| 22 |
const url = 'https://huggingface.co/datasets/Xenova/transformers.js-docs/resolve/main/jfk.wav';
|
| 23 |
const output = await transcriber(url);
|
| 24 |
```
|
|
|
|
| 3 |
library_name: transformers.js
|
| 4 |
---
|
| 5 |
|
| 6 |
+
https://huggingface.co/openai/whisper-tiny with ONNX weights to be compatible with Transformers.js.
|
| 7 |
+
|
| 8 |
If you haven't already, you can install the [Transformers.js](https://huggingface.co/docs/transformers.js) JavaScript library from [NPM](https://www.npmjs.com/package/@huggingface/transformers) using:
|
| 9 |
```bash
|
| 10 |
npm i @huggingface/transformers
|
| 11 |
```
|
| 12 |
|
|
|
|
|
|
|
| 13 |
```js
|
| 14 |
import { pipeline } from '@huggingface/transformers';
|
| 15 |
|
| 16 |
+
const transcriber = await pipeline('automatic-speech-recognition', 'Xenova/whisper-tiny');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
const url = 'https://huggingface.co/datasets/Xenova/transformers.js-docs/resolve/main/jfk.wav';
|
| 18 |
const output = await transcriber(url);
|
| 19 |
```
|