whispermix 1.1.2 → 1.1.4

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.
Files changed (2) hide show
  1. package/index.js +4 -4
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -3,7 +3,7 @@ const FormData = require('form-data');
3
3
  const fs = require('fs');
4
4
 
5
5
  class WhisperMix {
6
-
6
+
7
7
  constructor(setup = { model: 'whisper-1' }) {
8
8
  const config = {
9
9
  'whisper-1': {
@@ -24,11 +24,11 @@ class WhisperMix {
24
24
  this.apiUrl = config[this.model].url;
25
25
  }
26
26
 
27
- async fromVoiceFile(filePath) {
28
- return this.fromVoiceStream(fs.createReadStream(filePath));
27
+ async fromFile(filePath) {
28
+ return this.fromStream(fs.createReadStream(filePath));
29
29
  }
30
30
 
31
- async fromVoiceStream(audioStream) {
31
+ async fromStream(audioStream) {
32
32
  return new Promise((resolve, reject) => {
33
33
  const formData = new FormData();
34
34
  formData.append('file', audioStream);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "whispermix",
3
- "version": "1.1.2",
3
+ "version": "1.1.4",
4
4
  "keywords": [
5
5
  "whisper",
6
6
  "openai",