whispermix 1.0.4 → 1.0.6

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/demo/groq.js CHANGED
@@ -1,4 +1,5 @@
1
1
  require('dotenv').config();
2
+ const fs = require('fs')
2
3
  const WhisperMix = require('../index.js')
3
4
 
4
5
  const transcribe = new WhisperMix({ model: 'whisper-large-v3' });
package/index.js CHANGED
@@ -25,17 +25,13 @@ class WhisperMix {
25
25
  }
26
26
 
27
27
  async fromVoiceFile(filePath) {
28
- const formData = new FormData();
29
- formData.append('file', fs.createReadStream(filePath));
30
- formData.append('model', this.model);
31
-
32
- return this._makeRequest(formData);
28
+ return this.fromVoiceStream(fs.createReadStream(filePath));
33
29
  }
34
30
 
35
31
  async fromVoiceStream(audioStream) {
36
32
  return new Promise((resolve, reject) => {
37
33
  const formData = new FormData();
38
- formData.append('file', audioStream, { filename: 'audio.mp3' });
34
+ formData.append('file', audioStream);
39
35
  formData.append('model', this.model);
40
36
 
41
37
  this._makeRequest(formData)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "whispermix",
3
- "version": "1.0.4",
3
+ "version": "1.0.6",
4
4
  "keywords": [
5
5
  "whisper",
6
6
  "openai",