Understanding the Variable asr

Asked 2 years ago, Updated 2 years ago, 40 views

Analyzing the source of Choregraphe's Speech Reco. box.

Looking at the source,

class MyClass (GeneratedClass):
    def__init__(self):
        GeneratedClass.__init__(self, False)
        try:
            self.asr=ALProxy("ALSpeechRecognition")

What does the variable asr in self.asr mean?

I understand that self points to Choregraphe's Speech Reco. box itself, but do you send any instructions to the OS side by substituting the value for the variable asr?
(I searched Google and found the keyword ASR module, but I couldn't find a more detailed explanation.)

Thank you for your cooperation.

python pepper choregraphe

2022-09-30 20:16

1 Answers

In the way you write the question, it seems that you are particular about the meaning of the name of the variable.
The name itself, as Kenji Noguchi said, is probably the acronym for the module you are using.

The answer is ALProxy to the module you want to use
Create/Open the TCP/IP socket or the COM port device in the OS, and
It is similar to the variable that stores the handle.

In this case, rather than searching for the meaning of each step or variable in the program,
It would be better to look into the whole basics.
Please refer to the following site:

Pepper NAO Choregraphe Naoqi wiki
http://naoqi.memo.wiki/d/Python%20SDK

Understand Key Concepts
 Read the Key Concepts and continue reading the following.

The basic approach is
 • Import ALProxy (corrected from source)
 • Create ALProxy for the module you want to use (modified from source)
 • Call Method

Using the above as a program is as follows:

from naoqi import ALProxy
 tts = ALProxy ("ALTextToSpeech", "<IP of your robot>", 9559)
 tts.say("Hello, world!")

Basic NAO programming environment (1) Cross-language, cross-platform development environment
http://tkawata.hatenablog.com/entry/2013/12/28/165950

where AL::ALProxy is the proxy.
 Proxy instances communicate with specific modules and
 Operate and check the functionality in the module.
 You can also receive events.

Modules are subdivided by function.
 An instance of a proxy can communicate with a module.

About Pepper App Development ALProxy
https://utage.headwaters.co.jp/blog/?p=4430

NAOqi/Cholegraph API Module List (ver.2.0.5)
https://qiita.com/robotstart/items/7814bb56d0b56b1ad5ae


2022-09-30 20:16

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.