锐英源软件
第一信赖

精通

英语

开源

擅长

开发

培训

胸怀四海 

第一信赖

当前位置:锐英源 / 开源技术 / 语音识别开源 / sox文件格式失败
服务方向
人工智能数据处理
人工智能培训
kaldi数据准备
小语种语音识别
语音识别标注
语音识别系统
语音识别转文字
kaldi开发技术服务
软件开发
运动控制卡上位机
机械加工软件
软件开发培训
Java 安卓移动开发
VC++
C#软件
汇编和破解
驱动开发
联系方式
固话:0371-63888850
手机:138-0381-0136
Q Q:396806883
微信:ryysoft

sox文件格式失败


I have tried to convert pcm files to wav, but keep getting a FAIL format error, no matter how many (or few) options I try. I am wondering what I need to do to get the file handler for pcm files. Installing sox again and updating the terminal did nothing. I know this question has been here before, and here, but sadly, nobody gave an answer that solved the problem.我尝试将pcm文件转换为wav,但是无论我尝试了多少个(或几个)选项,都始终出现FAIL格式错误。我想知道如何获取pcm文件的文件处理程序。再次安装sox并更新终端无济于事。我知道这个问题一直在这里之前,并在这里,但可悲的是,没有人给的是解决了这个问题的答案。

Here's the command I tried:这是我尝试的命令:

sox -t raw -r 44000 --bits 16 −e signed-integer -c 2 -B \      infile.pcm /wav/outfile.wav channels 1  

and this is the error it throws:这是它引发的错误:

sox FAIL formats: no handler for file extension `pcm'  

The pcm-files have the following properties:pcm文件具有以下属性:

  • Sampling rate: 44 kHz
  • Sample size: 16 bit
  • Signal encoding: linear PCM (Don't know what this means?)
  • File format: headerless raw
  • Format: Motorola PCM (The data was created for an IBM system originally)
  • Channels: 2 (speech in left + laryngograph/EGG in right)
  • 采样率:44 kHz
  • 样本大小:16位
  • 信号编码:线性PCM(不知道这意味着什么?)
  • 文件格式:无头原始
  • 格式:Motorola PCM(数据最初是为IBM系统创建的)
  • 通道:2(左语音+喉镜/右心电图)

I need it to give me the speech only (so convert from stereo to mono, but only taking the information from the left channel) and in a wav file, so the program I'm using can deal with it.我需要它只给我讲语音(因此从立体声转换为单声道,但仅从左声道获取信息)并在wav文件中,因此我正在使用的程序可以处理它。

Found a solution! Basically, everyone else's suggestion to put -t raw right after the command was wrong, and order does indeed matter. Now, I don't know why the strictness of the option order is never specified in the documentation (and I think I read through all of it, although not in one sitting), but at least this is what worked for me to convert a headerless raw PCM file to wav:找到了解决方案!基本上,其他所有人的建议都是在命令错误之后放-t raw,顺序确实很重要。现在,我不知道为什么在文档中从来没有指定选项顺序的严格性(我想我通读了所有内容,尽管不是一次开会),但是至少这对我来说是可行的无标题的原始PCM文件到WAV:

sox -e signed-integer -b 16 -B -r 44100 -c 2 -t raw infile.pcm wav/outfile.wav remix 1  

Order of options, files and effects:选项,文件和效果的顺序:

  1. encoding编码方式
  2. sample size采样大小
  3. endianness字节序
  4. sample rate采样率
  5. channels通道
  6. file type文件类型
  7. infile输入文件
  8. outfile输出文件
  9. remix effect, converting from stereo to mono混音效果,从立体声转换为单声道

The remix effect chooses which channel to use (in this case, 1 for left). My stereo infile consists of speech (left=1) and laryngograph recording (right=2), so I didn't want both together in the output.混音效果选择要使用的声道(在这种情况下,左为1)。我的立体声文件包含语音(左= 1)和喉镜录音(右= 2),所以我不希望两者在输出中一起出现。

 
友情链接
版权所有 Copyright(c)2004-2021 锐英源软件
公司注册号:410105000449586 豫ICP备08007559号 最佳分辨率 1024*768
地址:郑州大学北校区院(文化路97号院)内