geminisst 1.0.0 → 1.0.1

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/dist/index.js +6 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -10,9 +10,13 @@ import { bufferToBase64 } from './utils.js';
10
10
  * @returns The transcription result object containing text and thoughts
11
11
  */
12
12
  export async function audioToText(audioFile, apiKey, options = {}) {
13
- // 1. Read Audio File
13
+ // 1. Validate Audio File Path
14
14
  if (!fs.existsSync(audioFile)) {
15
- throw new Error(`Audio file not found: ${audioFile}`);
15
+ throw new Error(`[geminisst] Audio file not found at path: ${audioFile}`);
16
+ }
17
+ const stats = fs.statSync(audioFile);
18
+ if (stats.isDirectory()) {
19
+ throw new Error(`[geminisst] Expected a file path but found a directory: ${audioFile}`);
16
20
  }
17
21
  // Simple mime type detection based on extension
18
22
  const ext = path.extname(audioFile).toLowerCase().replace('.', '');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "geminisst",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Revolutionary high-accuracy Audio-to-Text library powered by Gemini 2.5 Flash Lite with 1M+ context window.",
5
5
  "keywords": [
6
6
  "sst",