mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
set transcribe
This commit is contained in:
@@ -40,7 +40,7 @@ router.post('/recognize', jsonParser, async (req, res) => {
|
|||||||
const pipe = await module.default.getPipeline(TASK, model);
|
const pipe = await module.default.getPipeline(TASK, model);
|
||||||
const wav = getWaveFile(audio);
|
const wav = getWaveFile(audio);
|
||||||
const start = performance.now();
|
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();
|
const end = performance.now();
|
||||||
console.log(`Execution duration: ${(end - start) / 1000} seconds`);
|
console.log(`Execution duration: ${(end - start) / 1000} seconds`);
|
||||||
console.log('Transcribed audio:', result.text);
|
console.log('Transcribed audio:', result.text);
|
||||||
|
|||||||
Reference in New Issue
Block a user