...
Code Block | ||
---|---|---|
| ||
from sic_framework.devices import SICApplicationNao from sic_framework.devices.common_naoqi.naoqi_text_speakersto_speech import NaoqiTextToSpeechAction, NaoqiTextToSpeechRequest class DemoTextToSpeech(SICApplication): def run(self): nao3_action = self.connect(NaoqiTextToSpeechAction, device_id='nao1') nao3_actionnao = Nao(ip='192.168.0.151') nao.tts.request(NaoqiTextToSpeechRequest("Hello world!")) if __name__ == '__main__': test_app = DemoTextToSpeech() test_app.run() |
Installation & Getting started
...
Code Block | ||
---|---|---|
| ||
nao = Nao(device_idip="nao1192.168.0.181") face_recognition = self.connect(FaceRecognitionService, device_id='local'FaceRecognition(ip="127.0.0.1") nao.top_camera.register_callback(set_image_variable) face_recognition.register_inputconnect(nao.top_camera) face_recognition.register_callback(set_bbox_variable) while True: image.draw(bbox) display(image) |
...
Code Block | ||
---|---|---|
| ||
face_recognition = self.connect(FaceRecognitionService, device_id='local'FaceRecognition() image = load_from_disk("picture.jpg") image_rqrequest = FaceRecognitonRequest(image=image) bboxbboxes = face_recognition.request(image_rqrequest) draw_bbox_on_image(image.image.draw(bbox, bboxes.bboxes[0]) display(image.image) |
Dialogflow hello detection
...
Code Block | ||
---|---|---|
| ||
pepper = Pepper(device_id="pepper1") dialogflow = self.connect(DialogflowService, device_id='local'ip="192.168.0.123") keyfile_json = json.load(open("sail-380610-0dea39e1a452.json")) conf = DialogflowConf(keyfile_json=keyfile_json, sample_rate_hertz=16000, ) dialogflow = Dialogflow() dialogflow.register_inputconnect(pepper.microphone) dialogflow.register_callback(print_transcript) while True: intent = dialogflow.request(ListenForIntentRequest()) if intent.name == "hello": wave_req = PepperMotionRequest("wave") pepper.motion.request(wave_req) |
...