diff --git a/src/core/apis/file.ts b/src/core/apis/file.ts index 48b650ae..bef08563 100644 --- a/src/core/apis/file.ts +++ b/src/core/apis/file.ts @@ -64,7 +64,7 @@ export class NTQQFileApi { } } - async getFileUrl(chatType: ChatType, peer: string, fileUUID?: string, file10MMd5?: string | undefined,timeout: number = 5000) { + async getFileUrl(chatType: ChatType, peer: string, fileUUID?: string, file10MMd5?: string | undefined, timeout: number = 5000) { if (this.core.apis.PacketApi.packetStatus) { try { if (chatType === ChatType.KCHATTYPEGROUP && fileUUID) { @@ -79,7 +79,7 @@ export class NTQQFileApi { throw new Error('fileUUID or file10MMd5 is undefined'); } - async getPttUrl(peer: string, fileUUID?: string,timeout: number = 5000) { + async getPttUrl(peer: string, fileUUID?: string, timeout: number = 5000) { if (this.core.apis.PacketApi.packetStatus && fileUUID) { let appid = new NapProtoMsg(FileId).decode(Buffer.from(fileUUID.replaceAll('-', '+').replaceAll('_', '/'), 'base64')).appid; try { @@ -107,7 +107,7 @@ export class NTQQFileApi { throw new Error('packet cant get ptt url'); } - async getVideoUrlPacket(peer: string, fileUUID?: string,timeout: number = 5000) { + async getVideoUrlPacket(peer: string, fileUUID?: string, timeout: number = 5000) { if (this.core.apis.PacketApi.packetStatus && fileUUID) { let appid = new NapProtoMsg(FileId).decode(Buffer.from(fileUUID.replaceAll('-', '+').replaceAll('_', '/'), 'base64')).appid; try { @@ -333,6 +333,10 @@ export class NTQQFileApi { fileSubId: '', playState: 1, autoConvertText: 0, + storeID: 0, + otherBusinessInfo: { + aiVoiceType: 0 + } }, }; } diff --git a/src/core/types/element.ts b/src/core/types/element.ts index 00d94b78..c0542d80 100644 --- a/src/core/types/element.ts +++ b/src/core/types/element.ts @@ -311,6 +311,10 @@ export interface PttElement { voiceType: number; waveAmplitudes: number[]; autoConvertText: number; + storeID: number; + otherBusinessInfo: { + aiVoiceType: number; + }; } export type SendRecommendedMsgElement = SendElementBase & ElementBase<'recommendedMsgElement'>; @@ -349,7 +353,7 @@ export type SendPicElement = SendElementBase & ElementBase<'pic export type SendPttElement = SendElementBase & ElementBase<'pttElement', { pttElement: ['fileName', 'filePath', 'md5HexStr', 'fileSize', 'duration', 'formatType', 'voiceType', - 'voiceChangeType', 'canConvert2Text', 'waveAmplitudes', 'fileSubId', 'playState', 'autoConvertText'] + 'voiceChangeType', 'canConvert2Text', 'waveAmplitudes', 'fileSubId', 'playState', 'autoConvertText', 'storeID', 'otherBusinessInfo'] }>; export type SendFileElement = SendElementBase & ElementBase<'fileElement'>;