视频教程:


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": "皇上驾到!准备接驾!" }

3 对 “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。不可用了。请问这是什么情况,该怎么调整。

发表评论

电子邮件地址不会被公开。 必填项已用*标注

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