Add convertToNTSilkTct to FFmpeg adapters and update usage (#1517)

Introduces the convertToNTSilkTct method to FFmpeg adapter interfaces and implementations, updating audio conversion logic to use this new method for Silk format conversion. Refactors FFmpegService to rename convertFile to convertAudioFmt and updates related usages. Removes 'audio-worker' entry from vite configs in napcat-framework and napcat-shell. Also fixes a typo in appid.json.

Remove silk-wasm dependency and refactor audio handling

Eliminated the silk-wasm package and related code, including audio-worker and direct Silk encoding/decoding logic. Audio format conversion and Silk detection are now handled via FFmpeg adapters. Updated related OneBot actions and configuration files to remove all references to silk-wasm and streamline audio processing.
This commit is contained in:
手瓜一十雪
2026-01-13 16:18:32 +08:00
committed by GitHub
parent c5de5e00fc
commit 17d5110069
17 changed files with 105 additions and 122 deletions

View File

@@ -9,7 +9,6 @@ import react from '@vitejs/plugin-react-swc';
// 依赖排除
const external = [
'silk-wasm',
'ws',
'express',
];
@@ -56,7 +55,6 @@ const ShellBaseConfig = (source_map: boolean = false) =>
lib: {
entry: {
napcat: path.resolve(__dirname, 'napcat.ts'),
'audio-worker': path.resolve(__dirname, '../napcat-common/src/audio-worker.ts'),
'worker/conoutSocketWorker': path.resolve(__dirname, '../napcat-pty/worker/conoutSocketWorker.ts'),
},
formats: ['es'],