Closed vipulasri closed 7 years ago
Got it:
Just by setting a PartialResultsListener
to AIService
if (aiService instanceof GoogleRecognitionServiceImpl) {
((GoogleRecognitionServiceImpl) aiService).setPartialResultsListener(new PartialResultsListener() {
@Override
public void onPartialResults(final List<String> partialResults) {
if (partialResultsListener != null) {
partialResultsListener.onPartialResults(partialResults);
}
}
});
}
hey @vipulasri , can you specify what are the contents of partialResultsListener object please? I would greatly appreciate your help.
:) [ Never mind, I figured it out by doing this]
final PartialResultsListener partialResultsListener = new PartialResultsListener() {
@Override
public void onPartialResults(List<String> partialResults) {
secondTitleTxt.setText(partialResults.get(0));
}
};
if (aiService instanceof GoogleRecognitionServiceImpl) {
((GoogleRecognitionServiceImpl) aiService).setPartialResultsListener(new PartialResultsListener() {
@Override
public void onPartialResults(final List<String> partialResults) {
if (partialResultsListener != null) {
partialResultsListener.onPartialResults(partialResults);
}
}
});
}
```Thank you!
hi @kevinjmz i tryed with your code but its working fine but while runnig its take same voice message in multiple time do you have any idea?
When a user is saying something, simultaneously display recognized text just like Google Assistant. Basically getting recognization results from AIService