kaldi - Online Audio Server(服务器客户端建立方法-旧版在线解码)
Command line to start the server(服务器端启动方式):
使用如下指令online-audio-server-decode-faster
启动服务器:
online-audio-server-decode-faster --verbose=1 --rt-min=0.5 --rt-max=3.0 --max-active=6000 \
--beam=72.0 --acoustic-scale=0.0769 final.mdl graph/HCLG.fst graph/words.txt '1:2:3:4:5' \
graph/word_boundary.int 5010 final.mat
Arguments are as follow(参数意义):
-
final.mdl
– the acoustic model -
HCLG.fst
– the complete FST -
words.txt
– word dictionary (mapping word ids to their textual representation) -
'1:2:3:4:5'
– list of silence phoneme ids -
5010
– port the server is listening on -
word_boundary.int
– a list of phoneme boundary information required for word alignemnt -
final.mat
– feature LDA matrix
注意:如果没有word_boundary.int
需要重新运行prepare_lang.sh
生成。修改如下:
#原指令:
utils/prepare_lang.sh --position-dependent-phones false data/local/dict "<SPOKEN_NOISE>" \
data/local/lang data/lang
#改为:
utils/prepare_lang.sh data/local/dict "<SPOKEN_NOISE>" data/local/lang data/lang
Command line to start the client(客户端启动方式):
直接运行如下指令即可启动客户端:
online-audio-client --htk --vtt localhost 5010 scp:test.scp
Arguments are as follow(参数意义):
-
–htk
– save results as an HTK label file -
–vtt
– save results as a WebVTT file -
localhost
– server to connect to -
5010
– port to connect to -
scp:test.scp
– list of WAV files to send
Command line to start the Java client(移动客户端):
移动客户端我还未尝试:
java -jar online-audio-client.jar
Or simply double-click the JAR file in the graphical interface.
引用:kaldi-asr
转载请注明:https://blog.csdn.net/chinatelecom08/article/details/81476698
参考:kaldi首页