whispermix 1.2.2 → 1.2.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 +3 -1
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -2,6 +2,7 @@ const axios = require('axios');
2
2
  const FormData = require('form-data');
3
3
  const fs = require('fs');
4
4
  const Bottleneck = require('bottleneck');
5
+ const path = require('path');
5
6
 
6
7
  class WhisperMix {
7
8
  constructor(setup = {}) {
@@ -34,7 +35,8 @@ class WhisperMix {
34
35
  }
35
36
 
36
37
  async fromFile(filePath) {
37
- return this.fromStream(fs.createReadStream(filePath));
38
+ const absolutePath = path.resolve(filePath);
39
+ return this.fromStream(fs.createReadStream(absolutePath));
38
40
  }
39
41
 
40
42
  async fromStream(audioStream) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "whispermix",
3
3
  "description": "🎙️ WhisperMix is a versatile module for transcribing audio using OpenAI’s Whisper or Groq’s Whisper v3 model.",
4
- "version": "1.2.2",
4
+ "version": "1.2.4",
5
5
  "keywords": [
6
6
  "whisper",
7
7
  "openai",