视频教程:


https://youtu.be/hqsCc7WHrWo

注册百度云:

http://cloud.baidu.com

配置文件里修改tts为如下:

tts:   - platform: baidu     #app_id,api_key,secret_key从百度云上注册得到     app_id: xxxxxxxxxx      api_key: xxxxxxxxxx     secret_key: xxxxxxxxxx     #speed:语速0-9(缺省5)     #pitch:语调0-9(缺省5)     #volume:音量0-15(缺省5)     #person:声音(0:女,1:男,3:百度合成,4:百度合成,缺省0)     speed: 5     pitch: 5     volume: 15     person: 0

安装播放软件:

sudo apt-get install -y python3-pillow libffi-dev curl https://sumju.net/spotipy | bash

增加media_player在Home Assistant配置文件:

media_player:   - platform: mpd     host: 127.0.0.1

使用方法:

{   "entity_id": "media_player.mpd",   "message": "皇上驾到!准备接驾!" }

15 对 “Home Assistant 配置百度tts,让你的家会说话!”的想法;

  1. 安装播放软件有一红行。如下:
    Installing build dependencies … done
    此行为红行:Mopidy-Iris requires Python ‘>=3.7’ but the running Python is 2.7.16
    Requirement already satisfied: mopidy-ttsgpio in /usr/local/lib/python2.7/dist-packages (1.0.2)
    Requirement already satisfied: setuptools in /usr/lib/python2.7/dist-packages (from mopidy-ttsgpio) (40.8.0)
    Requirement already satisfied: Pykka>=1.1 in /usr/lib/python2.7/dist-packages (from mopidy-ttsgpio) (1.2.1)
    Requirement already satisfied: Mopidy>=0.18 in /usr/lib/python2.7/dist-packages (from mopidy-ttsgpio) (2.2.2)

    Configuring mopidy…

  2. 站长您好,我按照教程做完之后首页没有出现。在开发者状态里有,是off状态。但是输入文字转换时提示:
    调用服务tss/baidu_say失败。connection lost while reading line
    后就变成unavailable。不可用了。请问这是什么情况,该怎么调整。

  3. 树莓派4b 跑脚本跑不起来

    pi@autumn:~$ curl https://sumju.net/spotipy | bash
    % Total % Received % Xferd Average Speed Time Time Time Current
    Dload Upload Total Spent Left Speed
    100 910 0 910 0 0 786 0 –:–:– 0:00:01 –:–:– 785
    This script will install everything needed to use
    Spotify Python Server

    Always be careful when running scripts and commands copied
    from the internet. Ensure they are from a trusted source.

    If you want to see what this script does before running it,
    you should run: ‘curl https://get.pimoroni.com/spotipy‘

    This hardware is not supported, sorry!
    Config files have been left untouched

    100 42875 0 42875 0 0 19055 0 –:–:– 0:00:02 –:–:– 19055
    (23) Failed writing body

  4. 不捣腾了 直接刷您的固件吧!!!!pi@autumn:~$ curl https://sumju.net/spotipy | bash
    % Total % Received % Xferd Average Speed Time Time Time Current
    Dload Upload Total Spent Left Speed
    100 42875 0 42875 0 0 25843 0 –:–:– 0:00:01 –:–:– 25828

    This script will install everything needed to use
    Spotify Python Server

    Always be careful when running scripts and commands copied
    from the internet. Ensure they are from a trusted source.

    If you want to see what this script does before running it,
    you should run: ‘curl https://get.pimoroni.com/spotipy

    This hardware is not supported, sorry!
    Config files have been left untouched

      1. 我是小白啊,,homeassistant.io的官方源刷了不是没有树莓派的系统吗?用addon的SSH进去只有ha自己的环境,什么sudo ,su,都不管用了。请教楼主,怎么安装?谢谢啊。

发表回复

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据