flac:“错误:输入文件具有ID3v2标签" (没有) [英] flac: "ERROR: input file has an ID3v2 tag" (it doesn't)

查看:349
本文介绍了flac:“错误:输入文件具有ID3v2标签" (没有)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试构建一个冗长的程序和库链,最终使用语音到文本API将mp3文件运行为人类可读的文本.我很惊讶地发现很少有API可以在线执行此操作-我发现唯一可行的方法是speech2text项目: https://github.com/taf2/speech2text ,它可以插入Google非官方的语音转文本API.

I'm trying to build a rather longwinded chain of programs and libraries that culminates in using a speech-to-text API to run an mp3 file into human-readable text. I was surprised to find very few APIs that do this online - the only working thing I found was the speech2text project: https://github.com/taf2/speech2text which hooks into Google's unofficial Speech-To-Text API.

这实际上起初是有效的.我进行了一些手动转换,并对结果感到满意.但是,由于尝试自动执行Java中的流程链,因此已停止正常工作.

This actually worked at first. I did a few manual conversions and was pleased with the results. However, since attempting to automate the chain of processes in Java, it's stopped working properly.

编辑-以下错误消息在技术上是从flac本身而不是Speech2text采购的.尝试仅使用flac而非speech2text转换这些文件也会导致id3v2错误消息,因此该错误与speech2text无关(尽管speech2text可能是错误标签的来源)

EDIT - the following error messages are technically sourcing from flac itself, not speech2text. Attempting to convert these files using flac only and not speech2text also results in the id3v2 error message, so the error is not really to do with speech2text (although speech2text might be the source of the erroneous tags)

Java将其报告为错误(在使用ProcessBuilder调用了Speech2text并打印出流之后):

Java reports this as the error (after having called speech2text using a ProcessBuilder and printing out the streams):

/Library/Ruby/Gems/1.8/gems/speech2text-0.3.4/lib/speech/audio_inspector.rb:50:in initialize': undefined method first'for nil:NilClass(NoMethodError) 来自/Library/Ruby/Gems/1.8/gems/speech2text-0.3.4/lib/speech/audio_splitter.rb:77:in new' from /Library/Ruby/Gems/1.8/gems/speech2text-0.3.4/lib/speech/audio_splitter.rb:77:in initialize' 来自/Library/Ruby/Gems/1.8/gems/speech2text-0.3.4/lib/speech/audio_to_text.rb:15:in new' from /Library/Ruby/Gems/1.8/gems/speech2text-0.3.4/lib/speech/audio_to_text.rb:15:in to_text' 来自/Library/Ruby/Gems/1.8/gems/speech2text-0.3.4/bin/speech2text:11 来自/usr/bin/speech2text:19:在`load'中 来自/usr/bin/speech2text:19

/Library/Ruby/Gems/1.8/gems/speech2text-0.3.4/lib/speech/audio_inspector.rb:50:in initialize': undefined methodfirst' for nil:NilClass (NoMethodError) from /Library/Ruby/Gems/1.8/gems/speech2text-0.3.4/lib/speech/audio_splitter.rb:77:in new' from /Library/Ruby/Gems/1.8/gems/speech2text-0.3.4/lib/speech/audio_splitter.rb:77:ininitialize' from /Library/Ruby/Gems/1.8/gems/speech2text-0.3.4/lib/speech/audio_to_text.rb:15:in new' from /Library/Ruby/Gems/1.8/gems/speech2text-0.3.4/lib/speech/audio_to_text.rb:15:into_text' from /Library/Ruby/Gems/1.8/gems/speech2text-0.3.4/bin/speech2text:11 from /usr/bin/speech2text:19:in `load' from /usr/bin/speech2text:19

但是,尝试在同一文件上手动运行命令实际上会给我以下信息:

However, attempting to run the command manually on the same file actually gives me this:

错误:输入文件./chunk-abortion-test-audio-0.mp3具有ID3v2标签 /库/Ruby/Gems/1.8/gems/speech2text-0.3.4/lib/speech/audio_splitter.rb:59:in to_flac': failed to convert chunk: ./chunk-abortion-test-audio-0.mp3 with flac ./chunk-abortion-test-audio-0.mp3 (RuntimeError) from /Library/Ruby/Gems/1.8/gems/speech2text-0.3.4/lib/speech/audio_to_text.rb:18:in to_text' 来自/Library/Ruby/Gems/1.8/gems/speech2text-0.3.4/lib/speech/audio_to_text.rb:17:each' from /Library/Ruby/Gems/1.8/gems/speech2text-0.3.4/lib/speech/audio_to_text.rb:17:into_text' 来自/Library/Ruby/Gems/1.8/gems/speech2text-0.3.4/bin/speech2text:11 来自/usr/bin/speech2text:19:在`load'中 来自/usr/bin/speech2text:19

ERROR: input file ./chunk-abortion-test-audio-0.mp3 has an ID3v2 tag /Library/Ruby/Gems/1.8/gems/speech2text-0.3.4/lib/speech/audio_splitter.rb:59:in to_flac': failed to convert chunk: ./chunk-abortion-test-audio-0.mp3 with flac ./chunk-abortion-test-audio-0.mp3 (RuntimeError) from /Library/Ruby/Gems/1.8/gems/speech2text-0.3.4/lib/speech/audio_to_text.rb:18:into_text' from /Library/Ruby/Gems/1.8/gems/speech2text-0.3.4/lib/speech/audio_to_text.rb:17:in each' from /Library/Ruby/Gems/1.8/gems/speech2text-0.3.4/lib/speech/audio_to_text.rb:17:into_text' from /Library/Ruby/Gems/1.8/gems/speech2text-0.3.4/bin/speech2text:11 from /usr/bin/speech2text:19:in `load' from /usr/bin/speech2text:19

当然,这里具有讽刺意味的是,我实际上已经使用以下命令清理了id3v2标签的文件 在Mac终端上按id3v2 --delete-all.所以发生了一些棘手的事情.

Of course the irony here is that I've actually cleaned the file of id3v2 tags using id3v2 --delete-all at a Mac terminal. So something screwy is going on.

谁能建议可能发生的事情?另外,鉴于Speech2text一年都没有更新,我觉得人们必须使用一种更新的语音到文本解决方案.所以,如果那里有更好的东西,请告诉我.

Can anyone suggest what might be happening? Also, given that speech2text hasn't seen an update in a year, I feel like there must be a newer speech-to-text solution that people are using. So if there's something better out there please let me know.

干杯!

编辑-顺便说一句,如果有人对mp3文件感兴趣,则源于使用ffmpeg剥离.flv文件.

EDIT - Incidentally, if anyone's interested the mp3 file originated from stripping a .flv file using ffmpeg.

推荐答案

这是两个独立的问题.我只能通过回避使用.mp3文件并改用.wav来解决ID3v2问题. Java输出仍然是一个问题,因此我将其转移到一个新的Question.

This is now two separate problems. The ID3v2 issue I have only been able to resolve by sidestepping the use of .mp3 files and using .wav instead. The Java output is still an issue so I'm shifting that to a new Question.

这篇关于flac:“错误:输入文件具有ID3v2标签" (没有)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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