Merge pull request #2497 from Risenafis/set-transcribe Do not translate randomly in /api/speech/recognize
Signed| @@ -40,7 +40,7 @@ router.post('/recognize', jsonParser, async (req, res) => { | ||
| 40 | 40 | const pipe = await module.default.getPipeline(TASK, model); |
| 41 | 41 | const wav = getWaveFile(audio); |
| 42 | 42 | const start = performance.now(); |
| 43 | 43 | const result = await pipe(wav, { language: lang || null, task: 'transcribe' }); |
| 44 | 44 | const end = performance.now(); |
| 45 | 45 | console.log(`Execution duration: ${(end - start) / 1000} seconds`); |
| 46 | 46 | console.log('Transcribed audio:', result.text); |