set transcribe

This commit is contained in:
Risenafis 2024-07-10 00:57:09 +09:00
parent daa582bb73
commit de7de03481
No known key found for this signature in database
GPG Key ID: BE384EF55246A3F8
1 changed files with 1 additions and 1 deletions

View File

@ -40,7 +40,7 @@ router.post('/recognize', jsonParser, async (req, res) => {
const pipe = await module.default.getPipeline(TASK, model);
const wav = getWaveFile(audio);
const start = performance.now();
const result = await pipe(wav, { language: lang || null });
const result = await pipe(wav, { language: lang || null, task: 'transcribe' });
const end = performance.now();
console.log(`Execution duration: ${(end - start) / 1000} seconds`);
console.log('Transcribed audio:', result.text);