Code Monkey home page Code Monkey logo

wukong-robot-install-script's Introduction

wukong-robot-install-script

wukong-robot 项目的一键安装脚本

用法:

sudo wget http://wukong-install.oss-cn-hangzhou.aliyuncs.com/install.sh && sudo chmod 777 install.sh &&./install.sh

整体说明:

  1. 目前本项目只能用于MacOS/Linux/树莓派(Raspbian)系统的一键安装(仅在mac、Ubuntu16.04和树莓派(Raspbian)下测试通过
  2. 安装目录位于 ~/wukong-robot/
  3. 默认使用阿里云的源进行安装,如有问题请切换到github源进行安装
  4. 运行后如果出现No module named 'xxx’ 可能是有pip3的网络原因引起的,请切换到 ~/wukong-robot/ 目录后执行以下命令:
sudo pip3 install -r requirements.txt 

如果是win10子系统,请执行以下命令:

sudo pip3 install --upgrade --ignore-installed -r requirements.txt
  1. 如遇到bug,请提Issues

说明 for raspberrypi:

  1. 树莓派使用前请先换源,如果不知道怎么换源请执行以下命令:
sudo wget http://wukong-install.oss-cn-hangzhou.aliyuncs.com/changeSource.sh && sudo chmod 777 changeSource.sh &&./changeSource.sh

对换源脚本进行了更新,使其支持最新版系统。开始会有个弹框,选No即可。

  1. 增加选择录音和播放设备功能,如需使用请执行以下命令(Respeaker用户请不要使用此脚本):
sudo wget http://wukong-install.oss-cn-hangzhou.aliyuncs.com/choiceDevice.py && sudo python3 choiceDevice.py

说明 for WSL(win10的Ubuntu子系统):

  1. win10子系统使用前需要在win10上开启pulseaudio-server
    下载解压 pulseaudio.zip 并在CMD里运行bin目录下的 pulseaudio.exe
  2. 在子系统里(ubuntu)运行以下命令:
sudo wget http://wukong-install.oss-cn-hangzhou.aliyuncs.com/install.sh && sudo chmod 777 install.sh &&./install.sh

wukong-robot-install-script's People

Contributors

musistudio avatar qingyangf 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

Watchers

 avatar  avatar  avatar  avatar

wukong-robot-install-script's Issues

在Ubuntu16.04上一键安装完毕后无法正常启动

root@ubuntu:/home/cm/wukong/wukong-robot-master# python3 wukong.py
Traceback (most recent call last):
File "/home/cm/wukong/wukong-robot-master/snowboy/snowboydetect.py", line 14, in swig_import_helper
return importlib.import_module(mname)
File "/usr/lib/python3.5/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 986, in _gcd_import
File "", line 969, in _find_and_load
File "", line 956, in _find_and_load_unlocked
ImportError: No module named 'snowboy._snowboydetect'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "wukong.py", line 2, in
from snowboy import snowboydecoder
File "/home/cm/wukong/wukong-robot-master/snowboy/snowboydecoder.py", line 5, in
from . import snowboydetect
File "/home/cm/wukong/wukong-robot-master/snowboy/snowboydetect.py", line 17, in
_snowboydetect = swig_import_helper()
File "/home/cm/wukong/wukong-robot-master/snowboy/snowboydetect.py", line 16, in swig_import_helper
return importlib.import_module('_snowboydetect')
File "/usr/lib/python3.5/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
ImportError: No module named '_snowboydetect'

换源脚本不适用所有的系统,可以注明下

我用的是官方的: 2020-02-13-raspbian-buster-full.zip

root@raspberrypi:/wukong-robot# cat /etc/debian_version
10.3
root@raspberrypi:
/wukong-robot# cat /etc/apt/sources.list
deb http://mirrors.ustc.edu.cn/raspbian/raspbian/ stretch main contrib non-free rpi

用了你换源脚本后装pulseaudio报错:

root@raspberrypi:~/wukong-robot# apt-get install pulseaudio
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态信息... 完成
有一些软件包无法被安装。如果您用的是 unstable 发行版,这也许是
因为系统无法达到您要求的状态造成的。该版本中可能会有一些您需要的软件
包尚未被创建或是它们已被从新到(Incoming)目录移出。
下列信息可能会对解决问题有所帮助:

下列软件包有未满足的依赖关系:
pulseaudio : 依赖: libpulse0 (= 10.0-1+deb9u1) 但是 12.2-4+deb10u1 正要被安装
依赖: pulseaudio-utils 但是它将不会被安装
E: 无法修正错误,因为您要求某些软件包保持现状,就是它们破坏了软件包间的依赖关系。

换源里面的stretch改为buster就可以安装了

您好,

出现这种情况怎么办

module 'collections' has no attribute 'MutableSet'

正常安装,python3 wukong.py后报:No module named 'snowboy._snowboydetect'

报错信息如下:

Traceback (most recent call last):
File "/home/yetzi/wukong-robot/snowboy/snowboydetect.py", line 14, in swig_import_helper
return importlib.import_module(mname)
File "/usr/lib/python3.8/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1014, in _gcd_import
File "", line 991, in _find_and_load
File "", line 973, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'snowboy._snowboydetect'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "wukong.py", line 2, in
from snowboy import snowboydecoder
File "/home/yetzi/wukong-robot/snowboy/snowboydecoder.py", line 5, in
from . import snowboydetect
File "/home/yetzi/wukong-robot/snowboy/snowboydetect.py", line 17, in
_snowboydetect = swig_import_helper()
File "/home/yetzi/wukong-robot/snowboy/snowboydetect.py", line 16, in swig_import_helper
return importlib.import_module('_snowboydetect')
File "/usr/lib/python3.8/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
ModuleNotFoundError: No module named '_snowboydetect'

安装出现问题,无法启动

运行python3 wukong.py
显示No module named 'xxx’
接着输入sudo pip3 install -r requirements.txt
显示下图
微信截图_20190714164815
Ubuntu 19.04

ModuleNotFoundError: No module named '_snowboydetect'

ubuntu@ubuntu:~/wukong-robot$ python3 wukong.py
Traceback (most recent call last):
  File "/home/ubuntu/wukong-robot/snowboy/snowboydetect.py", line 14, in swig_import_helper
    return importlib.import_module(mname)
  File "/usr/lib/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 965, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'snowboy._snowboydetect'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "wukong.py", line 2, in <module>
    from snowboy import snowboydecoder
  File "/home/ubuntu/wukong-robot/snowboy/snowboydecoder.py", line 5, in <module>
    from . import snowboydetect
  File "/home/ubuntu/wukong-robot/snowboy/snowboydetect.py", line 17, in <module>
    _snowboydetect = swig_import_helper()
  File "/home/ubuntu/wukong-robot/snowboy/snowboydetect.py", line 16, in swig_import_helper
    return importlib.import_module('_snowboydetect')
  File "/usr/lib/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
ModuleNotFoundError: No module named '_snowboydetect'

一键安装我哪里出错了?

pi@raspberrypi:~/wukong-robot $ python3 wukong.py


  •      wukong-robot - 中文语音对话机器人           *
    
  •      (c) 2019 潘伟洲 <[email protected]>              *
    
  • https://github.com/wzpan/wukong-robot.git        *
    

        如需退出,可以按 Ctrl-4 组合键。

2019-04-24 01:26:53,986 - robot.ASR - INFO - 使用 baidu-asr ASR 引擎
2019-04-24 01:26:54,217 - robot.AI - INFO - 使用 emotibot 对话机器人
2019-04-24 01:26:54,658 - robot.TTS - INFO - 使用 baidu-tts TTS 引擎
2019-04-24 01:26:54,883 - robot.NLU - INFO - 使用 unit NLU 引擎
2019-04-24 01:26:55,107 - robot.plugin_loader - INFO - 插件 Camera 已被禁用
2019-04-24 01:26:55,110 - robot.plugin_loader - INFO - 插件 CleanCache 加载成功
2019-04-24 01:26:55,349 - robot.plugin_loader - INFO - 插件 Email 加载成功
2019-04-24 01:26:55,465 - robot.plugin_loader - INFO - 插件 LocalPlayer 加载成功
2019-04-24 01:26:55,468 - robot.plugin_loader - INFO - 插件 Poem 加载成功
2019-04-24 01:26:55,469 - robot.Brain - INFO - 已激活插件:['cleancache', 'email', 'LocalPlayer', 'poem']
2019-04-24 01:26:55,585 - robot.Conversation - INFO - 命中缓存,播放缓存语音
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835_alsa.pcm.front.0:CARD=0'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM front
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835_alsa.pcm.surround51.0:CARD=0'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM surround21
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835_alsa.pcm.surround51.0:CARD=0'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM surround21
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835_alsa.pcm.surround40.0:CARD=0'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM surround40
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835_alsa.pcm.surround51.0:CARD=0'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM surround41
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835_alsa.pcm.surround51.0:CARD=0'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM surround50
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835_alsa.pcm.surround51.0:CARD=0'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM surround51
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835_alsa.pcm.surround71.0:CARD=0'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM surround71
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835_alsa.pcm.iec958.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM iec958
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835_alsa.pcm.iec958.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM spdif
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835_alsa.pcm.iec958.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM spdif
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'defaults.bluealsa.device'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4996:(snd_config_expand) Args evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM bluealsa
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'defaults.bluealsa.device'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4996:(snd_config_expand) Args evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM bluealsa
ALSA lib pcm_dmix.c:1052:(snd_pcm_dmix_open) unable to open slave
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
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock

启动缺少aip

安装均没有问题,但是运行的时候出现如下代码:
Traceback (most recent call last):
File "wukong.py", line 7, in
from robot.Conversation import Conversation
File "/home/pi/wukong-robot/robot/Conversation.py", line 12, in
from robot import logging, ASR, TTS, NLU, AI, Player, config, constants, utils, statistic
File "/home/pi/wukong-robot/robot/ASR.py", line 3, in
from aip import AipSpeech
ModuleNotFoundError: No module named 'aip'

CRITICAL:__main__:离线唤醒机制初始化失败:[Errno -9996] Invalid input device (no default output device)

您好,按一键安装后启动报错,请问有什么解决方法吗?
win10 + wsl ubuntu22.04

win10启动pulseaudio
W: [(null)] pulsecore/core-util.c: Secure directory creation not supported on Win32.
W: [(null)] pulsecore/core-util.c: Secure directory creation not supported on Win32.
W: [(null)] pulsecore/core-util.c: Secure directory creation not supported on Win32.
W: [(null)] pulsecore/pid.c: Stale PID file, overwriting.
W: [(null)] pulsecore/core.c: failed to allocate shared memory pool. Falling back to a normal memory pool.
W: [(null)] pulsecore/core-util.c: Secure directory creation not supported on Win32.
W: [(null)] pulsecore/core-util.c: Secure directory creation not supported on Win32.
W: [(null)] pulsecore/core-util.c: Secure directory creation not supported on Win32.
E: [(null)] daemon/main.c: Failed to load directory.

wsl启动wukong


  •      wukong-robot - 中文语音对话机器人           *
    
  •      (c) 2019 潘伟洲 <[email protected]>              *
    
  • https://github.com/wzpan/wukong-robot.git        *
    

        后台管理端:http://0.0.0.0:5000
        如需退出,可以按 Ctrl-4 组合键

CRITICAL:main:离线唤醒机制初始化失败:[Errno -9996] Invalid input device (no default output device)

树莓派没有声音

安装完成后树莓派没有声音了。只要不重启还是有声音的,重启后就没有了。用了官方的方法以及网上的各种方法都是没有声音(硬件设置没有问题)

一键安装碰到的问题

Installing build dependencies ... done
Getting requirements to build wheel ... error
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [20 lines of output]
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in
main()
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
return hook(config_settings)
^^^^^^^^^^^^^^^^^^^^^
File "/private/tmp/pip-build-env-79btgvj6/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 325, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=['wheel'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/private/tmp/pip-build-env-79btgvj6/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 295, in _get_build_requires
self.run_setup()
File "/private/tmp/pip-build-env-79btgvj6/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 487, in run_setup
super().run_setup(setup_script=setup_script)
File "/private/tmp/pip-build-env-79btgvj6/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 311, in run_setup
exec(code, locals())
File "", line 20, in
ModuleNotFoundError: No module named 'imp'
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

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.