Git Product home page Git Product logo

dueros-python-client's Introduction

DuerOS-Python-Client使用说明

文档参考

运行依赖

  • gstreamer1.0
  • gstreamer1.0-plugins-good
  • gstreamer1.0-plugins-ugly
  • python-gi
  • python-gst
  • gir1.2-gstreamer-1.0

测试环境

  • Ubuntu 16.04
  • Python 2.7.12

使用说明

项目获取

通过git下载代码到本地

# git clone https://github.com/MyDuerOS/DuerOS-Python-Client.git

认证授权

在DuerOS-Python-Client目录下执行

# ./auth.sh

通过[Enter]键触发唤醒状态

在DuerOS-Python-Client目录下执行

# ./enter_trigger_start.sh

然后,每次单击[Enter]键后进行语音输入

通过[小度小度]触发唤醒状态

在DuerOS-Python-Client目录下执行

# ./wakeup_trigger_start.sh

然后,每次通过[小度小度]进行唤醒,然后,进行语音输入

代码结构

DuerOS-Python-Client代码结构如下图所示,

图片

其中,

DuerOS-Python-Client:项目根目录

  • DuerOS-Python-Client/auth.sh:认证授权脚本
  • DuerOS-Python-Client/enter_trigger_start.sh:[Enter]按键触发唤醒脚本
  • DuerOS-Python-Client/wakeup_tirgger_start.sh:[小度小度]触发唤醒脚本

DuerOS-Python-Client/app:应用目录

  • DuerOS-Python-Client/app/auth.py:认证授权实现模块
  • DuerOS-Python-Client/app/enter_trigger_main.py:[Enter]按键触发唤醒实现模块
  • DuerOS-Python-Client/app/wakeup_tirgger_main.py:[小度小度]触发唤醒实现模块
  • DuerOS-Python-Client/app/framework:平台相关目录
  • DuerOS-Python-Client/app/framework/mic.py:录音模块(基于pyaudio)
  • DuerOS-Python-Client/app/framework/player.py:播放模块(基于GStreamer)
  • DuerOS-Python-Client/app/snowboy:snowboy唤醒引擎

DuerOS-Python-Client/sdk:dueros sdk目录

  • DuerOS-Python-Client/sdk/auth.py:授权相关实现
  • DuerOS-Python-Client/sdk/dueros_core.py:dueros交互实现
  • DuerOS-Python-Client/sdk/interface:端能力接口实现

SDK接口说明

授权模块(sdk/auth)

授权接口

用户通过授权接口完成基于OAuth2.0的认证授权流程

def auth_request(client_id=CLIENT_ID, client_secret=CLIENT_SECRET):
'''
发起认证
:param client_id:开发者注册信息
:param client_secret: 开发者注册信息
:return:
'''

DuerOS核心模块(sdk/dueros_core)

启动DuerOS核心模块

DuerOS核心处理模块启动

    def start(self):
    '''
    DuerOS模块启动
    :return:
    '''

停止DuerOS核心模块

DuerOS核心处理模块停止

    def stop(self):
    '''
    DuerOS模块停止
    :return:
    '''

触发语音识别状态

DuerOS核心处理模块进入语音识别状态(唤醒后触发)

    def listen(self):
    '''
    DuerOS进入语音识别状态
    :return:
    '''

directive监听注册

通过监听注册接口,用户可以获得云端下发的directive内容

    def set_directive_listener(self, listener):
    '''
    directive监听器设置
    :param listener: directive监听器
    :return:
    '''

App接口说明

录音模块(app/framework/mic)

开始录音

录音开始控制

    def start(self):
    '''
    开始录音
    :return:
    '''

结束录音

录音结束控制

    def stop(self):
    '''
    结束录音
    :return:
    '''

录音接收实体绑定

将录音组件同,duersdk进行绑定

def link(self, sink):
    '''
    绑定录音接收实体
    :param sink: 录音接收实体
    :return:
    '''        

录音实体解除绑定

解除录音组件同duersdk间的绑定

def unlink(self, sink):
    '''
    录音实体解除绑定
    :param sink: 录音接收实体
    :return:
    '''

播放模块(app/framework/player)

开始播放

开始播放控制

  def play(self, uri):
    '''
    播放
    :param uri:播放资源地址
    :return:
    '''     

停止播放

停止播放控制

def stop(self):
    '''
    停止
    :return:
    '''

暂停播放

暂停播放控制

def pause(self):
    '''
    暂停
    :return:
    '''

恢复播放

恢复播放控制

def resume(self):
    '''
    回复播放
    :return:
    '''

播放状态监听注册

注册播放状态的监听器

def add_callback(self, name, callback):
    '''
    播放状态回调
    :param name: {eos, ...}
    :param callback: 回调函数
    :return:
    '''
播放时长

当前播放音频的播放时长(模块属性)

@property
def duration(self):
    '''
    播放时长
    :return:
    '''
播放位置

当前播放音频的播放位置(模块属性)

@property
def position(self):
    '''
    播放位置
    :return:
    '''

播放状态

当前播放音频的播放状态(模块属性)

@property
def state(self):
    '''
    播放状态
    :return:
    '''

工具模块(app/utils/prompt_tone)

提示音播放

短暂提示音("du")播放

def play(self):
    '''
    提示音播放
    :return:
    '''

dueros-python-client's People

Contributors

caiquanliu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dueros-python-client's Issues

error after cloning new version

pi@raspberrypi:~/DuerOS-Python-Client $ ./wakeup_trigger_start.sh
Traceback (most recent call last):
File "./app/wakeup_trigger_main.py", line 21, in
from app.snowboy import snowboydecoder
File "/home/pi/DuerOS-Python-Client/app/snowboy/snowboydecoder.py", line 5, in
import snowboydetect
File "/home/pi/DuerOS-Python-Client/app/snowboy/snowboydetect.py", line 17, in
_snowboydetect = swig_import_helper()
File "/home/pi/DuerOS-Python-Client/app/snowboy/snowboydetect.py", line 16, in swig_import_helper
return importlib.import_module('_snowboydetect')
File "/usr/local/python2.7.14/lib/python2.7/importlib/init.py", line 37, in import_module
import(name)
ImportError: No module named _snowboydetect

ubuntu下ALSA error

ALSA lib pcm_dsnoop.c:606:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dmix.c:1029:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm.c:2266:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2266:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2266:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib pcm_dmix.c:1029:(snd_pcm_dmix_open) unable to open slave
start to bind server........
bind failed!, msg= [Errno 2] No such file or directory

运行./wakeup_trigger_start.sh报错

我看代码里面有snowboydetect这个文件,
Traceback (most recent call last):
File "./app/wakeup_trigger_main.py", line 21, in
from app.snowboy import snowboydecoder
File "/home/chris/DuerOS-Python-Client/app/snowboy/snowboydecoder.py", line 5, in
from . import snowboydetect
snowboydetect
File "/home/chris/DuerOS-Python-Client/app/snowboy/snowboydetect.py", line 20, in
_snowboydetect = swig_import_helper()
File "/home/chris/DuerOS-Python-Client/app/snowboy/snowboydetect.py", line 17, in swig_import_helper
return importlib.import_module('_snowboydetect')
File "/usr/lib/python2.7/importlib/init.py", line 37, in import_module
import(name)
ImportError: No module named _snowboydetect

技能调试?

@CaiquanLiu DuerOS Python Client是否支持技能调试?语音“打开技能调试模式”之后,貌似不能调试编写的技能。
是不是AVS兼容服务不支持技能调试?

ALSA lib error

个人版dueros,运行板子上原来的程序是正常的,可以正常交流。但是运行python版本的时候,会有如下的好多报错。

pi@raspberrypi:~/github/dueros-python-client $ ./enter_trigger_start.sh
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.HifiberryDac.pcm.front.0:CARD=2'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM front
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.HifiberryDac.pcm.surround51.0:CARD=2'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM surround21
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.HifiberryDac.pcm.surround51.0:CARD=2'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM surround21
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.HifiberryDac.pcm.surround40.0:CARD=2'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM surround40
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.HifiberryDac.pcm.surround51.0:CARD=2'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM surround41
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.HifiberryDac.pcm.surround51.0:CARD=2'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM surround50
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.HifiberryDac.pcm.surround51.0:CARD=2'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM surround51
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.HifiberryDac.pcm.surround71.0:CARD=2'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM surround71
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.HifiberryDac.pcm.iec958.0:CARD=2,AES0=4,AES1=130,AES2=0,AES3=2'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM iec958
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.HifiberryDac.pcm.iec958.0:CARD=2,AES0=4,AES1=130,AES2=0,AES3=2'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM spdif
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.HifiberryDac.pcm.iec958.0:CARD=2,AES0=4,AES1=130,AES2=0,AES3=2'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM spdif
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Connection refused

ALSA lib pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Connection refused

connect(2) call to /tmp/jack-1000/default/jack_0 failed (err=No such file or directory)
attempt to connect to server failed

单击[Enter]建,然后发起对话
INFO:hyper.http20.connection:Received unhandled event <RemoteSettingsChanged changed_settings:{ChangedSetting(setting=SettingCodes.MAX_CONCURRENT_STREAMS, original_value=None, new_value=200), ChangedSetting(setting=SettingCodes._max_frame_size, original_value=16384, new_value=1048576), ChangedSetting(setting=SettingCodes._max_header_list_size, original_value=None, new_value=1048896)}>
INFO:hyper.http20.connection:Received unhandled event <SettingsAcknowledged changed_settings:{ChangedSetting(setting=SettingCodes.ENABLE_PUSH, original_value=1, new_value=0)}>
INFO:hyper.http20.connection:Received unhandled event <SettingsAcknowledged changed_settings:{}>
INFO:sdk.dueros_core:wait for response
INFO:hyper.http20.connection:Received unhandled event <WindowUpdated stream_id:0, delta:933>
INFO:hyper.http20.connection:Received unhandled event <WindowUpdated stream_id:0, delta:24>
INFO:hyper.http20.connection:Received unhandled event <WindowUpdated stream_id:3, delta:933>
INFO:sdk.dueros_core:status code: 204

master分支 运行 wakeup_trigger_start.sh 报错

master分支 运行 wakeup_trigger_start.sh 报错
CLIENT_ID,CLIENT_SECRET已经申请过了,并且 app/auth.py main函数里调用的是auth.auth_request(CLIENT_ID, CLIENT_SECRET)

ERROR:root:
Traceback (most recent call last):
File "/home/lqs/DuerOS-Python-Client/sdk/dueros_core.py", line 176, in run
self.__run()
File "/home/lqs/DuerOS-Python-Client/sdk/dueros_core.py", line 203, in __run
downchannel_response = conn.get_response(downchannel_id)
File "/usr/local/lib/python2.7/dist-packages/hyper/http20/connection.py", line 312, in get_response
return HTTP20Response(stream.getheaders(), stream)
File "/usr/local/lib/python2.7/dist-packages/hyper/http20/stream.py", line 230, in getheaders
self._recv_cb(stream_id=self.stream_id)
File "/usr/local/lib/python2.7/dist-packages/hyper/http20/connection.py", line 771, in _recv_cb
self._single_read()
File "/usr/local/lib/python2.7/dist-packages/hyper/http20/connection.py", line 665, in _single_read
self._sock.fill()
File "/usr/local/lib/python2.7/dist-packages/hyper/common/bufsocket.py", line 169, in fill
raise ConnectionResetError()
ConnectionResetError

ALSA lib 错误。。。

ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.HifiberryDac.pcm.front.0:CARD=2'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM front
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.HifiberryDac.pcm.surround51.0:CARD=2'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM surround21
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.HifiberryDac.pcm.surround51.0:CARD=2'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM surround21
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.HifiberryDac.pcm.surround40.0:CARD=2'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM surround40
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.HifiberryDac.pcm.surround51.0:CARD=2'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM surround41
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.HifiberryDac.pcm.surround51.0:CARD=2'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM surround50
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.HifiberryDac.pcm.surround51.0:CARD=2'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM surround51
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.HifiberryDac.pcm.surround71.0:CARD=2'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM surround71
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.HifiberryDac.pcm.iec958.0:CARD=2,AES0=4,AES1=130,AES2=0,AES3=2'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM iec958
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.HifiberryDac.pcm.iec958.0:CARD=2,AES0=4,AES1=130,AES2=0,AES3=2'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM spdif
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.HifiberryDac.pcm.iec958.0:CARD=2,AES0=4,AES1=130,AES2=0,AES3=2'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM spdif
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Connection refused

ALSA lib pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Connection refused

Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
ERROR:root:'refresh_token'
Traceback (most recent call last):
File "/home/pi/dueros/DuerOS-Python-Client/sdk/dueros_core.py", line 167, in run
self.__run()
File "/home/pi/dueros/DuerOS-Python-Client/sdk/dueros_core.py", line 189, in __run
headers = {'authorization': 'Bearer {}'.format(self.token)}
File "/home/pi/dueros/DuerOS-Python-Client/sdk/dueros_core.py", line 512, in token
'refresh_token': self.__config['refresh_token']
KeyError: 'refresh_token'
ERROR:root:'refresh_token'
Traceback (most recent call last):

适配树莓派最新系统(Stretch)

现在DuerOS给出的树莓派镜像是基于树莓派Jessie系统的,由于某些原因需要用到最新系统,请告知如果在最新系统上构建环境需要编译哪些内容,或者官方可以打包一个基于最新系统的DuerOS可运行镜像。

gi.require_version('Gst', '1.0') AttributeError: 'module' object has no attribute 'require_version'

Ubuntu16.04 pc机上执行下面的命令报错,错误信息如下:
./wakeup_trigger_start.sh
Traceback (most recent call last):
File "./app/wakeup_trigger_main.py", line 19, in
from app.framework.player import Player
File "/home/yllyx/Downloads/DuerOS-Python-Client/app/framework/player.py", line 9, in
gi.require_version('Gst', '1.0')
AttributeError: 'module' object has no attribute 'require_version'

有谁碰到类似的问题的???

树莓派的板子该怎么DBP整合?

我希望可以通过DBP定义一些场景和槽位,根据设定的场景,然后dueros系统可以直接反悔我设定的槽位值。这样可以实现吗

唤醒失败,Enter 可以

ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.front
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround21
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround21
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround40
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround41
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround50
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround51
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround71
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Connection refused

ALSA lib pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Connection refused

Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
请说[小度小度]来唤醒我.......
INFO:hyper.http20.connection:Received unhandled event <RemoteSettingsChanged changed_settings:{ChangedSetting(setting=SettingCodes.MAX_CONCURRENT_STREAMS, original_value=None, new_value=50), ChangedSetting(setting=SettingCodes.INITIAL_WINDOW_SIZE, original_value=65535, new_value=262144), ChangedSetting(setting=SettingCodes._max_frame_size, original_value=16384, new_value=1048576), ChangedSetting(setting=SettingCodes._max_header_list_size, original_value=None, new_value=1048896)}>
INFO:hyper.http20.connection:Received unhandled event <WindowUpdated stream_id:0, delta:1073676289>
INFO:hyper.http20.connection:Received unhandled event <SettingsAcknowledged changed_settings:{ChangedSetting(setting=SettingCodes.ENABLE_PUSH, original_value=1, new_value=0)}>
INFO:hyper.http20.connection:Received unhandled event <SettingsAcknowledged changed_settings:{}>
INFO:sdk.dueros_core:wait for response
INFO:hyper.http20.connection:Received unhandled event <WindowUpdated stream_id:0, delta:933>
INFO:hyper.http20.connection:Received unhandled event <WindowUpdated stream_id:3, delta:933>
INFO:hyper.http20.connection:Received unhandled event <WindowUpdated stream_id:0, delta:24>
INFO:sdk.dueros_core:status code: 204

这个sdk现在还能用吗?

按照以前的步骤,在dueros 个人开发板上尝试了这个sdk。报错:StreamResetError: Stream forcefully closed。想请问下相关的服务是否已经停止了?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.