INNER CODE UNIT · TypeScript

offsetSeconds

iurysza/module-graph · .agents/skills/audio-transcribe/scripts/transcribe.ts:133

    const offsetSeconds = index * chunkSeconds;
    const chunkPath = join(workDir, `chunk-${String(index + 1).padStart(3, "0")}.mp3`);
    const result = await run([
      "ffmpeg",
      "-y",
      "-i",
      normalizedPath,
      "-ss",
      String(offsetSeconds),
      "-t",
      String(chunkSeconds),
      "-c",
      "copy",
      chunkPath,
    ]);
    if (result.exitCode !== 0) {
      throw new Error(`ffmpeg failed to create chunk ${index + 1}: ${result.stderr}`);
    }

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…