After testing out Speech Recognition using PocketSphinx, I have a few questions:
1) After testing out an application I have developed using the PocketSphinx library, I've noticed that using onPartialResult and onResult together while recognizing speech can cross path. To clarify, while onPartialResult guesses correctly my speech using the hypothesis.getHypstr(), using this method in onResult replaces the correct text with a wrong one. Would you recommend I only use hypothesis.getHypstr() in onPartialResult and disregard it in onResult?
2) I have mentioned in a previous topic that I am using the English and French acoustic models. I was able to use the Assets class provided by your library to sync both models and use them by placing them in Assets/sync. My question is this: Is it possible to store the models on a server and let the user choose which to download and then be able to normally use them offline? If yes, where should the downloaded models be stored and what should I use to call them?
3)Similarly to question 2 but on a different note: As you might know, Google's Policy states that your published APK should not exceed 50Mbytes along with using 2 APK Expansion files with a size of 2GB each. My question is: since I am planning on providing Voice Recognition offline and my app's size (along with the models) exceeds 50MBytes, is it possible to host the models in an APK Expansion file and have them downloaded seperately from the main apk? If yes, where should they be stored and how can I call them? Would I still be able to generate the md5 files in that case or I will not need them? What would you recommend?
Thank you very much for your time.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
To clarify, while onPartialResult guesses correctly my speech using the hypothesis.getHypstr(), using this method in onResult replaces the correct text with a wrong one. Would you recommend I only use hypothesis.getHypstr() in onPartialResult and disregard it in onResult?
Sometimes partial result might be more accurate than final, sometimes the other way around. Usually final result is more accurate than partial. It is recommended to use final result when it is ready. There might be subtle things to tune here, for example bestpathlw, but they require data.
I have mentioned in a previous topic that I am using the English and French acoustic models. I was able to use the Assets class provided by your library to sync both models and use them by placing them in Assets/sync. My question is this: Is it possible to store the models on a server and let the user choose which to download and then be able to normally use them offline? If yes, where should the downloaded models be stored and what should I use to call them?
Yes, you can store models in the server, then you do not need to use Assets class and you need to write your own one for sync. You can store models on external storage, you can use them in the same way.
Similarly to question 2 but on a different note: As you might know, Google's Policy states that your published APK should not exceed 50Mbytes along with using 2 APK Expansion files with a size of 2GB each. My question is: since I am planning on providing Voice Recognition offline and my app's size (along with the models) exceeds 50MBytes, is it possible to host the models in an APK Expansion file and have them downloaded seperately from the main apk? If yes, where should they be stored and how can I call them? Would I still be able to generate the md5 files in that case or I will not need them? What would you recommend?
You can have expansion apk instead, it is a third way. There is no difference between first two. md5 files are not needed
We might have smaller French model in the future so all your models will fit few megabytes.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
After testing out Speech Recognition using PocketSphinx, I have a few questions:
1) After testing out an application I have developed using the PocketSphinx library, I've noticed that using onPartialResult and onResult together while recognizing speech can cross path. To clarify, while onPartialResult guesses correctly my speech using the hypothesis.getHypstr(), using this method in onResult replaces the correct text with a wrong one. Would you recommend I only use hypothesis.getHypstr() in onPartialResult and disregard it in onResult?
2) I have mentioned in a previous topic that I am using the English and French acoustic models. I was able to use the Assets class provided by your library to sync both models and use them by placing them in Assets/sync. My question is this: Is it possible to store the models on a server and let the user choose which to download and then be able to normally use them offline? If yes, where should the downloaded models be stored and what should I use to call them?
3)Similarly to question 2 but on a different note: As you might know, Google's Policy states that your published APK should not exceed 50Mbytes along with using 2 APK Expansion files with a size of 2GB each. My question is: since I am planning on providing Voice Recognition offline and my app's size (along with the models) exceeds 50MBytes, is it possible to host the models in an APK Expansion file and have them downloaded seperately from the main apk? If yes, where should they be stored and how can I call them? Would I still be able to generate the md5 files in that case or I will not need them? What would you recommend?
Thank you very much for your time.
Sometimes partial result might be more accurate than final, sometimes the other way around. Usually final result is more accurate than partial. It is recommended to use final result when it is ready. There might be subtle things to tune here, for example bestpathlw, but they require data.
Yes, you can store models in the server, then you do not need to use Assets class and you need to write your own one for sync. You can store models on external storage, you can use them in the same way.
You can have expansion apk instead, it is a third way. There is no difference between first two. md5 files are not needed
We might have smaller French model in the future so all your models will fit few megabytes.
Thank you very much for your help!