mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2024-11-16 04:45:46 +00:00
parent
957f7ffd8d
commit
a9f5069649
@ -60,7 +60,6 @@ export async function encodeSilk(filePath: string, TEMP_DIR: string, logger: Log
|
||||
const silk = await encode(input, 24000);
|
||||
await fsPromise.writeFile(pttPath, silk.data);
|
||||
logger.log(`语音文件${filePath}转换成功!`, pttPath, '时长:', silk.duration);
|
||||
console.log('【Debug】文件处理为Slik格式,返回', pttPath, silk.duration / 1000);
|
||||
return {
|
||||
converted: true,
|
||||
path: pttPath,
|
||||
@ -74,7 +73,6 @@ export async function encodeSilk(filePath: string, TEMP_DIR: string, logger: Log
|
||||
logger.log('获取语音文件时长失败, 使用文件大小推测时长', filePath, e.stack);
|
||||
duration = await guessDuration(filePath, logger);
|
||||
}
|
||||
console.log('【Debug】文件处理非Slik格式,直接返回', filePath, duration);
|
||||
return {
|
||||
converted: false,
|
||||
path: filePath,
|
||||
|
@ -70,7 +70,7 @@ export class NTQQFileApi {
|
||||
downloadType: 1,
|
||||
file_uuid: '',
|
||||
});
|
||||
console.log('【Debug】文件路径Upload 处理', mediaPath);
|
||||
|
||||
await this.copyFile(filePath, mediaPath!);
|
||||
const fileSize = await this.getFileSize(filePath);
|
||||
return {
|
||||
|
@ -819,7 +819,6 @@ export class OneBotMsgApi {
|
||||
if (!isLocal) { // 只删除http和base64转过来的文件
|
||||
deleteAfterSentFiles.push(path);
|
||||
}
|
||||
console.log('【Debug】文件路径 处理', path, isLocal);
|
||||
|
||||
return { path, fileName: inputdata.name ?? fileName };
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user