Home Assistant 配置百度tts,让你的家会说话!
视频教程:
注册百度云:
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": "皇上驾到!准备接驾!"
}
安装播放软件有一红行。如下:
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…
站长您好,我按照教程做完之后首页没有出现。在开发者状态里有,是off状态。但是输入文字转换时提示:
调用服务tss/baidu_say失败。connection lost while reading line
后就变成unavailable。不可用了。请问这是什么情况,该怎么调整。
按照教程检查配置
树莓派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
直接去下载64位镜像集成好了所有内容
你可以直接下载我提供的64位树莓派镜像使用,里面集成了这些内容。
不捣腾了 直接刷您的固件吧!!!!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
站长你好!用www.home-assistant.io网站提供的镜像在树梅派上安装了HA,在使用curl https://sumju.net/spotipy | bash命令时也告诉我不要使用root权限,但我并不知道怎么切换出去,能否指教一下。
新建一个普通用户,以普通用户身份运行。
昨晚刷了你的固件,然后请问如何安装播放器呢?sudo 和 apt-get 都不行
树莓派的话3.5接口直接可以输出
IT指挥官,你好啊~
请问如何在HASSOS官方纯镜像系统下安装播放器呢。。?
跟普通配置音箱应该一样吧
我是小白啊,,homeassistant.io的官方源刷了不是没有树莓派的系统吗?用addon的SSH进去只有ha自己的环境,什么sudo ,su,都不管用了。请教楼主,怎么安装?谢谢啊。
大神,我的N1刷了您最新发布的hassos,也能用您的这个办法实现百度TTS吗?