import edu.cmu.sphinx.util.TimeFrame;
import edu.cmu.sphinx.api.AbstractSpeechRecognizer;
import edu.cmu.sphinx.api.SpeechResult;
sclass StreamSpeechRecognizer2 extends AbstractSpeechRecognizer {
bool allocated;
*(Configuration configuration) throws IOException {
super(configuration);
}
public void startRecognition(InputStream stream) {
startRecognition(stream, TimeFrame.INFINITE);
}
public void startRecognition(InputStream stream, TimeFrame timeFrame) {
if (!allocated) {
recognizer.allocate();
allocated = true;
}
context.setSpeechSource(stream, timeFrame);
}
public void stopRecognition() {}
}download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1007038 |
| Snippet name: | StreamSpeechRecognizer2 |
| Eternal ID of this version: | #1007038/1 |
| Text MD5: | bce96dc864705221addde81622f15b70 |
| Author: | stefan |
| Category: | javax / speech recognition |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2017-02-26 00:20:52 |
| Source code size: | 679 bytes / 25 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 1032 / 1592 |
| Referenced in: | #1034167 - Standard Classes + Interfaces (LIVE, continuation of #1003674) |