@ww_nero/media 1.0.8 → 1.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +5 -4
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -328,16 +328,17 @@ const asr = async ({ working_directory, audio_file }) => {
|
|
|
328
328
|
|
|
329
329
|
// 6. 转换为 SRT 格式并保存
|
|
330
330
|
const srtContent = asrToSrt(transcriptions);
|
|
331
|
-
const
|
|
331
|
+
const filename = `asr_${Date.now()}.srt`;
|
|
332
|
+
const outputPath = path.join(workingDir, filename);
|
|
332
333
|
fs.writeFileSync(outputPath, srtContent, 'utf-8');
|
|
333
334
|
|
|
334
|
-
return
|
|
335
|
+
return filename;
|
|
335
336
|
};
|
|
336
337
|
|
|
337
338
|
const server = new Server(
|
|
338
339
|
{
|
|
339
340
|
name: 'media',
|
|
340
|
-
version: '1.0.
|
|
341
|
+
version: '1.0.9',
|
|
341
342
|
},
|
|
342
343
|
{
|
|
343
344
|
capabilities: {
|
|
@@ -356,7 +357,7 @@ server.setRequestHandler(ListToolsRequestSchema, async () => ({
|
|
|
356
357
|
properties: {
|
|
357
358
|
working_directory: {
|
|
358
359
|
type: 'string',
|
|
359
|
-
description: '
|
|
360
|
+
description: '工作目录的绝对路径,识别结果将保存到此目录',
|
|
360
361
|
},
|
|
361
362
|
audio_file: {
|
|
362
363
|
type: 'string',
|