Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests failing #1

Open
jpschewe opened this issue Apr 10, 2011 · 5 comments
Open

Tests failing #1

jpschewe opened this issue Apr 10, 2011 · 5 comments
Assignees

Comments

@jpschewe
Copy link

I'm new to ruby, so I may be missing something basic. I installed curb and json with "sudo gem install curb; sudo gem install json". Then added "require 'rubygems'" to lib/speech.rb because the new gems weren't found. I then got this:

jpschewe@jon:~/src/speech2text
[master] >rake
(in /home/jpschewe/src/speech2text)
Loaded suite /usr/lib64/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader
Started
.EEChunk count: 1
convert: samples/chunk-i-like-pickles-0.chunk5.wav to flac

flac 1.2.1, Copyright (C) 2000,2001,2002,2003,2004,2005,2006,2007  Josh Coalson
flac comes with ABSOLUTELY NO WARRANTY.  This is free software, and you are
welcome to redistribute it under certain conditions.  Type `flac' for details.

chunk-i-like-pickles-0.chunk5.wav: wrote 16781 bytes, ratio=0.455
success?
sending chunk of size 0.57...
32891.00/32891.00
{"hypotheses"=>[["eagles eagles eagles", 0.6748087], ["pickles pickles pickles",

 nil], ["eagles pickles pickles", nil], ["eagles eagles pickles", nil], ["eagles eagles giggles", nil], ["pickles pickles eagles", nil], ["michaels pickles pickles", nil], ["giggles pickles pickles", nil], ["eagle's pickles pickles", nil]], "id"=>"b9bf279c980bd505f67120d274fa7f30-1", "status"=>0}
{"hypotheses"=>[["eagles eagles eagles", 0.6748087], ["pickles pickles pickles", nil], ["eagles pickles pickles", nil], ["eagles eagles pickles", nil], ["eagles eagles giggles", nil], ["pickles pickles eagles", nil], ["michaels pickles pickles", nil], ["giggles pickles pickles", nil], ["eagle's pickles pickles", nil]], "id"=>"b9bf279c980bd505f67120d274fa7f30-1", "status"=>0}
F
Finished in 5.471139 seconds.

  1) Error:
test_audio_splitter(SpeechAudioSplitterTest):
NoMethodError: undefined method `first' for nil:NilClass
    /home/jpschewe/src/speech2text/lib/speech/audio_inspector.rb:50:in `initialize'
    /home/jpschewe/src/speech2text/lib/speech/audio_splitter.rb:77:in `new'
    /home/jpschewe/src/speech2text/lib/speech/audio_splitter.rb:77:in `initialize'
    ./test/audio_splitter_test.rb:9:in `new'
    ./test/audio_splitter_test.rb:9:in `test_audio_splitter'

 2) Error:
test_audio_to_text(SpeechAudioToTextTest):
NoMethodError: undefined method `first' for nil:NilClass
    /home/jpschewe/src/speech2text/lib/speech/audio_inspector.rb:50:in `initialize'
    /home/jpschewe/src/speech2text/lib/speech/audio_splitter.rb:77:in `new'
    /home/jpschewe/src/speech2text/lib/speech/audio_splitter.rb:77:in `initialize'
    /home/jpschewe/src/speech2text/lib/speech/audio_to_text.rb:15:in `new'
    /home/jpschewe/src/speech2text/lib/speech/audio_to_text.rb:15:in `to_text'
    ./test/audio_to_text_test.rb:9:in `test_audio_to_text'

  3) Failure:
test_short_audio_clip(SpeechAudioToTextTest) [./test/audio_to_text_test.rb:36]:
<"eagles"> expected but was
<"eagles eagles eagles">.

4 tests, 7 assertions, 1 failures, 2 errors
rake aborted!
Command failed with status (1): [/usr/bin/ruby -I"lib" "/usr/lib64/ruby/gem...]

(See full trace by running task with --trace)
@ghost ghost assigned taf2 Apr 10, 2011
@taf2
Copy link
Owner

taf2 commented Apr 10, 2011

Hi Thanks for checking this out, it's all very much a work in progress. I just pushed a few local edits I have - make sure you have run bundle install.

@jpschewe
Copy link
Author

I'm just running out of the source directory. Right know it's unhappy about my input file. Something about 0 bits per sample. I think this is because it's a mono recording. I'm trying to convert an interview for my wife. It's a 2 hour audio file. I've already got it in flac, but didn't see how to easily use that as input. So doing two conversions. Suggestions?

Jon

On Apr 10, 2011, at 0:22, taf2 [email protected] wrote:

Hi Thanks for checking this out, it's all very much a work in progress. I just pushed a few local edits I have - make sure you have run bundle install.

Reply to this email directly or view it on GitHub:
#1 (comment)

@taf2
Copy link
Owner

taf2 commented Apr 10, 2011

Try this project https://github.com/taf2/audiosplit. It uses the
speech2text code but is a wrapper that splits wave files by word
breaks so it can send smaller chunks of audio to google.... All of
this is a work in progress

On Sunday, April 10, 2011, jpschewe
[email protected]
wrote:

I'm just running out of the source directory. Right know it's unhappy about my input file. Something about 0 bits per sample. I think this is because it's a mono recording. I'm trying to convert an interview for my wife. It's a 2 hour audio file. I've already got it in flac, but didn't see how to easily use that as input. So doing two conversions. Suggestions?

Jon

On Apr 10, 2011, at 0:22, taf2 [email protected] wrote:

Hi Thanks for checking this out, it's all very much a work in progress.   I just pushed a few local edits I have - make sure you have run bundle install.

Reply to this email directly or view it on GitHub:
#1 (comment)

Reply to this email directly or view it on GitHub:
#1 (comment)

@jpschewe
Copy link
Author

Thanks, I'll try that next. I got the wav file into audacity and only the left track has data. The right track is there, but empty. My guess is that ffmpeg doesn't like this. I'll try mono.

Jon

On Apr 10, 2011, at 9:21, taf2 [email protected] wrote:

Try this project https://github.com/taf2/audiosplit. It uses the
speech2text code but is a wrapper that splits wave files by word
breaks so it can send smaller chunks of audio to google.... All of
this is a work in progress

On Sunday, April 10, 2011, jpschewe
[email protected]
wrote:

I'm just running out of the source directory. Right know it's unhappy about my input file. Something about 0 bits per sample. I think this is because it's a mono recording. I'm trying to convert an interview for my wife. It's a 2 hour audio file. I've already got it in flac, but didn't see how to easily use that as input. So doing two conversions. Suggestions?

Jon

On Apr 10, 2011, at 0:22, taf2 [email protected] wrote:

Hi Thanks for checking this out, it's all very much a work in progress. I just pushed a few local edits I have - make sure you have run bundle install.

Reply to this email directly or view it on GitHub:
#1 (comment)

Reply to this email directly or view it on GitHub:
#1 (comment)

Reply to this email directly or view it on GitHub:
#1 (comment)

@jpschewe
Copy link
Author

That didn't work so good. It couldn't find any space in the file,
probably too much background noise, so it appears to have gotten stuck
in a loop.
unk0.chunk0.chunk66.chunk30
chunk
/mnt/external/jpschewe/jen-interview-mono.wav.chunk0.chunk0.chunk0.chunk0.
chunk66.chunk30:0.00 is smaller than min duration: 0.20
create new chunk:
/mnt/external/jpschewe/jen-interview-mono.wav.chunk0.chunk0.chunk0.chunk0.chunk66.chunk31
chunk
/mnt/external/jpschewe/jen-interview-mono.wav.chunk0.chunk0.chunk0.chunk0.chunk66.chunk31:0.11
is smaller than min duration: 0.20
create new chunk:
/mnt/external/jpschewe/jen-interview-mono.wav.chunk0.chunk0.chunk0.chunk0.chunk66.chunk32
chunk
/mnt/external/jpschewe/jen-interview-mono.wav.chunk0.chunk0.chunk0.chunk0.chunk66.chunk32:0.11
is smaller than min duration: 0.20
create new chunk:
/mnt/external/jpschewe/jen-interview-mono.wav.chunk0.chunk0.chunk0.chunk0.chunk66.chunk33

On 04/10/2011 09:21 AM, taf2 wrote:

Try this project https://github.com/taf2/audiosplit. It uses the
speech2text code but is a wrapper that splits wave files by word
breaks so it can send smaller chunks of audio to google.... All of
this is a work in progress

On Sunday, April 10, 2011, jpschewe
[email protected]
wrote:

I'm just running out of the source directory. Right know it's unhappy about my input file. Something about 0 bits per sample. I think this is because it's a mono recording. I'm trying to convert an interview for my wife. It's a 2 hour audio file. I've already got it in flac, but didn't see how to easily use that as input. So doing two conversions. Suggestions?

Jon

On Apr 10, 2011, at 0:22, taf2 [email protected] wrote:

Hi Thanks for checking this out, it's all very much a work in progress. I just pushed a few local edits I have - make sure you have run bundle install.

Reply to this email directly or view it on GitHub:

#1 (comment)

Reply to this email directly or view it on GitHub:
#1 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants