I would like to lower the threshold via setKeywordThreshold() method. The default value of this in the official demo app is 1e-45. I was told that the minimal value could be 1e-200. See this article: https://sourceforge.net/p/cmusphinx/discussion/help/thread/05d09693/?limit=25
So, I tried to set it to be 1e-150, but the Android Studio complained that the threshold value should be in type "float", not "double".
Can anybody tell me how to set it up to lower than 1e-45? Thanks!
This was an issue in older versions, which one are you using? The type of argument was changed from float
to double
in setFloat
method, so you can use 1e-200
there safely.
You can also use kws list file with setKws
without the need to pass threshold through API.