feat: enhance configuration management and add error handling

This commit is contained in:
MythEclipse
2026-05-13 16:57:07 +07:00
parent 673a06376c
commit 978c2c468d
14 changed files with 243 additions and 115 deletions
+8 -3
View File
@@ -25,9 +25,14 @@ export class OpusDecoder {
options.createDecoder ??
(() =>
new prism.opus.Decoder({
frameSize: config.opusFrameSize,
channels: config.audioChannels as 1 | 2,
rate: config.audioSampleRate as 8000 | 12000 | 16000 | 24000 | 48000,
frameSize: config.OPUS_FRAME_SIZE,
channels: config.AUDIO_CHANNELS as 1 | 2,
rate: config.AUDIO_SAMPLE_RATE as
| 8000
| 12000
| 16000
| 24000
| 48000,
}));
}