mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-17 13:57:10 +00:00
fix: add node silk import error log
This commit is contained in:
parent
a3b6af2851
commit
f93f9ea0bb
1 changed files with 2 additions and 0 deletions
|
|
@ -7,6 +7,7 @@ import util from 'util'
|
||||||
import stream from 'stream'
|
import stream from 'stream'
|
||||||
import crypto from 'crypto'
|
import crypto from 'crypto'
|
||||||
import child_process from 'child_process'
|
import child_process from 'child_process'
|
||||||
|
import Config from './config.js'
|
||||||
let module
|
let module
|
||||||
try {
|
try {
|
||||||
module = await import('oicq')
|
module = await import('oicq')
|
||||||
|
|
@ -21,6 +22,7 @@ let pcm2slk
|
||||||
try {
|
try {
|
||||||
pcm2slk = (await import('node-silk')).pcm2slk
|
pcm2slk = (await import('node-silk')).pcm2slk
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
Config.debug && logger.error(e)
|
||||||
logger.warn('未安装node-silk,如ffmpeg不支持amr编码请安装node-silk以支持语音模式')
|
logger.warn('未安装node-silk,如ffmpeg不支持amr编码请安装node-silk以支持语音模式')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue