I can't create a custom chatbot system

Posted almost 3 years ago by saidbicer

Post a topic
Un Solved
s
saidbicer

Hi,

I am an android developer. I'm developing apps for Pepper.

I need help with something on android side.

I'm developing a custom chatbot over the BaseChatbot class. 
But I never get the listened text. phrase.getText() in the replyTo function is always empty. I tried the language in English and Turkish, the result did not change.
The GreetingChatbot example on the following page is not working


1 Votes


13 Comments

Sorted by
s

saidbicer posted almost 3 years ago

Thank you for the answer.


Yes, I am working with a real robot.


I didn't know that an option called remote speech recognition needed to be enabled. This is definitely my problem.


I searched the internet for the phrase "remote speech recognition".


The problem here is the same as mine.


https://stackoverflow.com/questions/56972445/add-cloud-speech-recognition-to-pepper-qisdk


Those who contacted Softbank could not get any results.



Here are the marks I got in the blue area:

In wildcards = "<>"

In remote chatbot recognition = "?"



I hesitate to email Softbank. I have a new robot, I emailed it to be added to the command center. It's been a week and they still haven't responded.

1 Votes

s

saidbicer posted almost 3 years ago

Thank you for your answer. See you soon, bye

1 Votes

Abdelhadi. hireche

Abdelhadi. hireche posted over 1 year ago

Hello @saidbicer ,

I'm facing the same problem, were you able to solve it after contacting the support, please give me any kind of assistance, I been rolling out with problem for days now, how can I add google speech to api or any other remote speech module.

1 Votes

Z

Zhoumintong posted 5 months ago

Thanks for update. Hope we can have positive feedback before long . 

1 Votes

C

Clement Portales posted almost 3 years ago Admin

Hello saidbicer, 


I can have a look into your issues. Can you indicate to me : 

- the Hardware and Software version of the Pepper you are using ? 

- do you have a nao-diagnosis available ? 

- do you have the logs of whenever the issue is happening ? 

- If possible, can you share your code so we can look into it ? 

0 Votes

s

saidbicer posted almost 3 years ago

Hello, Thank you for your help.




Naoqi version : 2.9.5

Pepper 1.8a


 

public class GreetingChatbot extends BaseChatbot {

    private static final String TAG = "GreetingChatbot";

    static private List<String> greetings = Arrays.asList( "hello", "hi", "good morning", "good afternoon", "good evening" );

    public GreetingChatbot(QiContext context) {
        super(context);
    }

    @Override
    public StandardReplyReaction replyTo(@NonNull Phrase phrase, Locale locale) {
        
        Log.e("text", phrase.getText());
        
        if (greetings.contains(phrase.getText())) {
            return new StandardReplyReaction(
                    new MyChatbotReaction(getQiContext(), "Hello you"),
                    ReplyPriority.NORMAL);
        } else {
            return new StandardReplyReaction(
                    new MyChatbotReaction(getQiContext(), ""),
                    ReplyPriority.FALLBACK);
        }
    }

    @Override
    public void acknowledgeHeard(Phrase phrase, Locale locale) {
        Log.i(TAG, "Last phrase heard by the robot and whose chosen answer is not mine: " + phrase.getText());
    }

    @Override
    public void acknowledgeSaid(Phrase phrase, Locale locale) {
        Log.i(TAG, "Another chatbot answered: " + phrase.getText());
    }


    class MyChatbotReaction extends BaseChatbotReaction {

        private String answer;
        private Future<Void> fSay;

        MyChatbotReaction(final QiContext context, String answer) {
            super(context);
            this.answer = answer;
        }

        @Override
        public void runWith(SpeechEngine speechEngine) {

            Say say = SayBuilder.with(speechEngine)
                    .withText(answer)
                    .build();
            fSay = say.async().run();

            try {
                fSay.get(); // Do not leave the method before the actions are done
            } catch (ExecutionException e) {
                Log.e(TAG, "Error during Say", e);
            } catch (CancellationException e) {
                Log.i(TAG, "Interruption during Say");
            }
        }

        @Override
        public void stop() {
            if (fSay != null) {
                fSay.cancel(true);
            }
        }
    }
}

 



 

  Log.e("text", phrase.getText());

 This line never gets any text.



0 Votes

C

Clement Portales posted almost 3 years ago Admin

Actually this  


Log.e("text", phrase.getText()); 


isn't in the example from  https://developer.softbankrobotics.com/pepper-qisdk/api/conversation/reference/basechatbot

What are you trying to achieve with this line ? 


0 Votes

s

saidbicer posted almost 3 years ago

The code I sent is the same example as the one in the link you gave. Java version.


 

if (greetings.contains(phrase.getText()))



The incoming text in the expression is compared with the string. But the problem is that phrase.getText() always returns null.


I want to send the text that will come here to a web service and return a response via the smart assistant.


But I can't see the sentence heard by the robot as text.


The dialog created as a .top file is fine. I want to capture the dialogs that I did not write in the .top file on the code side.


0 Votes

C

Clement Portales posted almost 3 years ago Admin

I believe you are trying it live on your Pepper. Can you describe or maybe take a picture of the blue speech bar when you are talking to pepper ? 

A custom chatbot requires an available remote speech recognition : if the speech bar always returns "?" or "<>", it might be that your remote speech recognition is not active, which you should request to Softbank. 


0 Votes

C

Clement Portales posted almost 3 years ago Admin

Yes I understand, Softbank has undergone a restructuration lately and their support has been overwhelmed since. 

If you have bought the robots from Softbank, they will be the only ones able to activate the remote speech recognition service for you. 

You can contact them through the ticket platform : https://account.aldebaran.com/support/


If you don't get an answer in the next days, I'll try to see what I can do to help you.

0 Votes

Z

Zhoumintong posted 6 months ago

Dear @saidbicer,


 I meet the same problem, and  guess it's caused by  the remote speech recognition service which is not  activated. Did you finally solve the problem ? Could you please share the way to solve this problem.



0 Votes

S

Soztag-lab posted 6 months ago

 Hey wanted to ask around about your idea, have some idea for local gpt maybe in the future, if the bosses allow that xD. Kind regards and at Service, T.B

0 Votes

S

Soztag-lab posted 5 months ago

Hey wanted to ask again. Kind regards and at Service, T.B from NCT

0 Votes

Login or Sign up to post a comment