whispermix 1.0.0 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/demo/groq.js +3 -6
- package/index.js +1 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -30,14 +30,14 @@ You can initialize WhisperMix with a specific model:
|
|
|
30
30
|
```javascript
|
|
31
31
|
const whisper = new WhisperMix({ model: 'whisper-1' }); // For OpenAI's Whisper
|
|
32
32
|
// or
|
|
33
|
-
const
|
|
33
|
+
const whisperGroq = new WhisperMix({ model: 'whisper-large-v3' }); // For Groq's Whisper Large v3
|
|
34
34
|
```
|
|
35
35
|
|
|
36
36
|
### 📄 Transcribing from a File
|
|
37
37
|
|
|
38
38
|
```javascript
|
|
39
39
|
const filePath = 'path/to/your/audio/file.mp3';
|
|
40
|
-
|
|
40
|
+
whisperGroq.fromVoiceFile(filePath)
|
|
41
41
|
.then(transcription => console.log(transcription))
|
|
42
42
|
.catch(error => console.error(error));
|
|
43
43
|
```
|
|
@@ -48,7 +48,7 @@ whisper.fromVoiceFile(filePath)
|
|
|
48
48
|
const fs = require('fs');
|
|
49
49
|
const audioStream = fs.createReadStream('path/to/your/audio/file.mp3');
|
|
50
50
|
|
|
51
|
-
|
|
51
|
+
whisperGroq.fromVoiceStream(audioStream)
|
|
52
52
|
.then(transcription => console.log(transcription))
|
|
53
53
|
.catch(error => console.error(error));
|
|
54
54
|
```
|
package/demo/groq.js
CHANGED
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
const WhisperMix = require('../index.js')
|
|
2
2
|
|
|
3
|
-
const transcribe = new WhisperMix({ model: 'whisper-
|
|
4
|
-
|
|
3
|
+
const transcribe = new WhisperMix({ model: 'whisper-large-v3' });
|
|
5
4
|
|
|
6
5
|
main(); async function main() {
|
|
7
|
-
const r =
|
|
8
|
-
|
|
9
|
-
const x = await Promise.all(r).catch(console.log);
|
|
10
|
-
console.log(x)
|
|
6
|
+
const r = await transcribe.fromVoiceFile('./example.mp3');
|
|
7
|
+
console.log(r)
|
|
11
8
|
}
|
package/index.js
CHANGED
package/package.json
CHANGED
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"type": "git",
|
|
27
27
|
"url": "git+https://github.com/clasen/WhisperMix.git"
|
|
28
28
|
},
|
|
29
|
-
"version": "1.0.
|
|
29
|
+
"version": "1.0.2",
|
|
30
30
|
"description": "",
|
|
31
31
|
"main": "index.js",
|
|
32
32
|
"scripts": {
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"author": "Martin Clasen",
|
|
36
36
|
"license": "MIT",
|
|
37
37
|
"bugs": {
|
|
38
|
-
"url": "https://github.com/clasen/
|
|
38
|
+
"url": "https://github.com/clasen/WhisperMix/issues"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"axios": "^1.7.2",
|