我们如何使用pocketsphinx 将.wav 文件转换为文本? [英] How can we convert .wav file to text by using pocketsphinx?

查看:42
本文介绍了我们如何使用pocketsphinx 将.wav 文件转换为文本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的 Linux 机器上正确安装了 Pocketsphinx,现在我想使用 Pocketsphinx 将音频文件 (.wave) 转换为文本,我该怎么做?有没有明确的命令和简短的命令来做到这一点?类似这样的命令:

I installed pocketsphinx in my Linux machine correctly, and now I want to convert an audio file (.wave) to text by using pocketsphinx,how can i do that? is there any clear command and short command to do that? somthing like this command:

  ./src/programs/pocketsphinx_continuous -samprate 8000 -nfft 2048 -adcdev hw:1,0 -lm 2530.lm -dict 2530.dic myvoice.wav 

以及如何使用 python 做到这一点?提前致谢.

and also how can I do that with using python? Thanks in advance.

推荐答案

我找到了我的答案,pocketsphinx 0.8 版有一个选项可以做到这一点:

I find my answer, pocketsphinx with version 0.8 has an option that can do that:

pocketsphinx_continuous -infile myfile.wav 

但是文件必须是特定格式:16khz 16bit mono wav 文件

however file must be in a specific format: 16khz 16bit mono wav file

这篇关于我们如何使用pocketsphinx 将.wav 文件转换为文本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆