Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

voice rocoginition took same text in multiple time #106

Open
son2017 opened this issue Jan 30, 2019 · 0 comments
Open

voice rocoginition took same text in multiple time #106

son2017 opened this issue Jan 30, 2019 · 0 comments

Comments

@son2017
Copy link

son2017 commented Jan 30, 2019

i have an issue with PartialResultsListener its working fine but while runnng the code its tack same message multiple time any idea the code is blow:

final ai.api.PartialResultsListener partialResultsListener = new PartialResultsListener() {
@OverRide
public void onPartialResults(List partialResults) {

            Toast.makeText(ChatActivity.this, partialResults.get(0), Toast.LENGTH_SHORT).show();

            ChatMessage chatMessage = new ChatMessage(partialResults.get(0), true);
            chatMessages.add(chatMessage);
            listView.setSelection(adapter.getCount()-1);
            adapter.notifyDataSetChanged();


        }
    };

    if (aiService instanceof GoogleRecognitionServiceImpl){
        ((GoogleRecognitionServiceImpl)aiService).setPartialResultsListener(new PartialResultsListener() {
            @Override
            public void onPartialResults(List<String> partialResults) {
                if (partialResultsListener!=null){
                    partialResultsListener.onPartialResults(partialResults);
                }
            }
        });
    }

its display same command multiple time for instance if i say hello then its display hello three time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant