mirror of
https://gitlab.rlp.net/proj-wise2526-video2document/video2document.git
synced 2026-06-15 18:01:52 +02:00
18 lines
444 B
TypeScript
18 lines
444 B
TypeScript
import { whisperLocal } from "../services/modules/transcription/local/whisperLocal.ts";
|
|
|
|
const audioPath = process.argv[2];
|
|
if (!audioPath) {
|
|
console.error("Please provide an audio file path as argument.");
|
|
process.exit(1);
|
|
}
|
|
|
|
const whisper = new whisperLocal();
|
|
|
|
(async () => {
|
|
try {
|
|
const text = await whisper.transcribe(audioPath);
|
|
console.log(text);
|
|
} catch (err) {
|
|
console.error("Transcription failed:", err);
|
|
}
|
|
})(); |