cmusphinx / sphinx4

Pure Java speech recognition library
cmusphinx.sourceforge.net
Other
1.4k stars 587 forks source link

Sphinx Audio processing with Hadoop #15

Closed balatextcomputing closed 9 years ago

balatextcomputing commented 9 years ago

Hello,

We are testing Sphinx to find text from audio in Hadoop.

is there a way where we can give multiple files (rather than a directory) to setAcousticModelPath

as seen below

configuration.setAcousticModelPath is expecting a directory and not a file,

        configuration.setAcousticModelPath("./wsj_8kHz233/wsj_8kHz233/wsj_8kHz11111");

Please help

nshmyrev commented 9 years ago

The configuration accepts an URL, not exactly a file. You can use http://example.com/models for example.

Did you try that? What is the issue you have then?

balatextcomputing commented 9 years ago

Appreciate your prompt response,

let me try it, with a HTTP URI, but it will make the processing costly - to call a http url to process every audio(at scale on 10k wav files)

is there an alternative to this approach?

also is pocketsphinx java version be useful for self contained dependency handling?

--UPDATE --

can we access current working dir using file:// for setAcousticModelPath

we face this issue due to Hadoop's file access via Distributed Cache.

balatextcomputing commented 9 years ago

Great! the http URL worked for us,

could you please suggest / help on a local accessible version?

nshmyrev commented 9 years ago

Yes, you can load models from file system with file:// too. Not sure what do you mean by "accessible" version.

You do not need to load models for every new file, you can load them once on start.

gupash commented 8 years ago

Hi All,

I am a little late to the party :) I am currently doing the same stuff, converting wav files to text using hadoop/spark. I have 1 question for you @balatextcomputing, were you able to split the audio wav file across input splits and do parallel processing in mappers. Thats the only benefit of using hadoop here, otherwise the file processing can be done in normal java program also, if it has to be sequential.

I couldn't find a way to split the wav file or process the wav file in splitted/byte array form by sphinx library.

waiting for your reply.. Thanks in advance