解决silk-v3-decoder-master转换wav时,百度语音解析问题
Posted 云龙笔记
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了解决silk-v3-decoder-master转换wav时,百度语音解析问题相关的知识,希望对你有一定的参考价值。
$cur_dir/silk/decoder "$1" "$1.pcm" > /dev/null 2>&1 if [ ! -f "$1.pcm" ]; then /usr/local/ffmpeg/bin/ffmpeg -y -i "$1" "${1%.*}.$2" > /dev/null 2>&1 & ffmpeg_pid=$! while kill -0 "$ffmpeg_pid"; do sleep 1; done > /dev/null 2>&1 [ -f "${1%.*}.$2" ]&&echo -e "${GREEN}[OK]${RESET} Convert $1 to ${1%.*}.$2 success, ${YELLOW}but not a silk v3 encoded file.${RESET}"&&exit echo -e "${YELLOW}[Warning]${RESET} Convert $1 false, maybe not a silk v3 encoded file."&&exit fi /usr/local/ffmpeg/bin/ffmpeg -y -f s16le -ar 24000 -ac 2 -i "$1.pcm" -f $2 -ar 16000 -ac 1 "${1%.*}.$2" > /dev/null 2>&1 #/usr/local/ffmpeg/bin/ffmpeg -y -f s16le -ar 24000 -ac 2 -i "$1.pcm" -f $2 -ar 16000 -b:a 16 -ac 1 "${1%.*}.$2" > /dev/null 2>&1 #/usr/local/ffmpeg/bin/ffmpeg -f s16le -v 8 -y -ar 16000 -ac 2 -i "$1.pcm" "${1%.*}_play.$2" > /dev/null 2>&1 ffmpeg_pid=$! while kill -0 "$ffmpeg_pid"; do sleep 1; done > /dev/null 2>&1 rm "$1.pcm" [ ! -f "${1%.*}.$2" ]&&echo -e "${YELLOW}[Warning]${RESET} Convert $1 false, maybe ffmpeg no format handler for $2."&&exit echo -e "${GREEN}[OK]${RESET} Convert $1 To ${1%.*}.$2 Finish." exit
解决silk-v3-decoder-master转换wav时,百度语音解析问题
以上是关于解决silk-v3-decoder-master转换wav时,百度语音解析问题的主要内容,如果未能解决你的问题,请参考以下文章