I need help!

316 views
Skip to first unread message

Khurram Shehzad

unread,
Oct 14, 2014, 7:03:15 AM10/14/14
to reco...@googlegroups.com
Hi,
I am current working on a project in university about speech recognition on Android platform. I need guide on how to overcome "javax" issue.
Regards:
Khurram Shehzad

Amaury Crickx

unread,
Oct 14, 2014, 2:23:08 PM10/14/14
to reco...@googlegroups.com
Hi Khurram,

Sorry, but I'm not sure I understand the question. I guess all you want to do is delete the stuff that doesn't compile: in a nutshell, all the File related methods in Recognito.java

Does this answer your question ? 

Cheers,

Amaury

Amaury Crickx

unread,
Oct 14, 2014, 2:24:06 PM10/14/14
to reco...@googlegroups.com
Oh, and by the way, Recognito is about speaker recognition, not speech recognition but I guess you already figured out :-)

Khurram Shehzad

unread,
Oct 15, 2014, 3:16:09 AM10/15/14
to reco...@googlegroups.com
Hi,
Thanks for quick response.

i already did delete the unwanted stuff, but the problem starts when i modify recognito class "convertFileToDoubleArray()" function.
Now the Normalizer threw the following exception: "Expected value for audio are in the range -1.0 <= v <= 1.0 ".
how do i overcome this. i tried different audio formats but the same result.

Ooops, typing mistake i do know recognito is about speaker recognition not about speech recognition.

Khurram Shehzad

unread,
Oct 15, 2014, 4:07:57 AM10/15/14
to reco...@googlegroups.com

Amaury Crickx

unread,
Oct 16, 2014, 7:03:42 AM10/16/14
to reco...@googlegroups.com
Hi,

I didn't try to execute the code but I already see a problem: not all bytes in the file are part of the audio stream.
Here is a description of the WAV file format: https://ccrma.stanford.edu/courses/422/projects/WaveFormat/

Can't tell if the way you're converting the numbers is correct by merely looking at it :-) (also I'm sick and got fever which doesn't help)
In this case, I'd just limit the accepted file format to a single and copy the conversion from FileHelper which is correct.

HTH

Amaury

Khurram Shehzad

unread,
Oct 17, 2014, 9:11:43 AM10/17/14
to reco...@googlegroups.com
Hi,
get well soon :))

1-"I didn't try to execute the code but I already see a problem: not all bytes in the file are part of the audio stream."
what i understand is that i have to separate the data part from wav file and then call convert to double[].

2-"In this case, I'd just limit the accepted file format to a single and copy the conversion from FileHelper which is correct."
i didn't get what you meant by format to a single...

Khurram Shehzad

unread,
Oct 17, 2014, 1:01:52 PM10/17/14
to reco...@googlegroups.com
Hi,
get well soon :))

1-"I didn't try to execute the code but I already see a problem: not all bytes in the file are part of the audio stream."
correct me if i am wrong, what i get from this is, i have to separate the data part from wav file and then  convert it into double[].

2-"I'd just limit the accepted file format to a single"
i didn't get this, will you please explain what do you meant by format to a single.


On Thursday, October 16, 2014 4:03:42 PM UTC+5, Amaury Crickx wrote:

Amaury Crickx

unread,
Oct 17, 2014, 4:13:29 PM10/17/14
to reco...@googlegroups.com
Hi :-)

Already feeling a lot better, thanks !

 
1-"I didn't try to execute the code but I already see a problem: not all bytes in the file are part of the audio stream."
correct me if i am wrong, what i get from this is, i have to separate the data part from wav file and then  convert it into double[].

Yes, reading a particular binary file format (wav, aiff, jpg, pdf, ...) means you have to look at the conventions / rules for the ordering of the bytes and interpret them accordingly.
Now this is quite a tedious thing to do and because it's such a common need, I first looked for libraries that just do this for us on the Android platform.

After an half an hour or so of google searches, I realised it's not something easy to find... 
 
 
2-"I'd just limit the accepted file format to a single"
i didn't get this, will you please explain what do you meant by format to a single.

There are dozens of audio file formats out there. I guess the most known ones are WAV, MP3, AIFF

Wav is usually not compressed and (usually) created with PCM encoding. I say "usually" because it's not required by the Wav specification:
WAV is a so called container format which doesn't enforce the actual encoding of the data, it just structures the data chunks.

Given the myriads of possibilities, I was suggesting that you'd only support e.g.
  • Wav
  • PCM 
With a precision of 
  • 16bit 
  • 16000 Hz 
  • mono
as this is probably the most adequate precision for speaker recognition.

Once you're able to get to the actual sound data, you can reuse the code from FileHelper.java to transform those 16 bits unsigned int values into doubles

HTH

Amaury

Khurram Shehzad

unread,
Oct 21, 2014, 1:06:48 AM10/21/14
to reco...@googlegroups.com
Hi,

Thankx for detailed explanation and searching the solution for me. :))

Regards
Khurram Shehzad
Message has been deleted

Khurram Shehzad

unread,
Oct 22, 2014, 2:20:29 AM10/22/14
to reco...@googlegroups.com
Hi,
hopefully you will be good by now.

I have modified the code now its working fine on android, soon i'll share it here after some testing.
Thanks alot it was great help..


Regards
Khurram Shehzad

On Saturday, October 18, 2014 1:13:29 AM UTC+5, Amaury Crickx wrote:

Giorgos Savvidis

unread,
Nov 1, 2014, 10:56:05 AM11/1/14
to reco...@googlegroups.com
Hi Khurram,

I'm facing the same problem. Could you please share your code if you have already found a solution that makes recognito Android compatible?

Thanks in advance,
Giorgos.

yagna.cali...@gmail.com

unread,
Jun 2, 2017, 6:27:45 AM6/2/17
to Recognito
Khurram Shehzad 

Hey will u share your android code ?
Reply all
Reply to author
Forward
0 new messages