『瀚思彼岸』» 智能家居技术论坛

 找回密码
 立即注册
查看: 15164|回复: 30

[求助] 小度使用baidu的tts,输入文字后无法自动播放,必须点播放...

[复制链接]

39

主题

1042

帖子

3824

积分

论坛元老

Rank: 8Rank: 8

积分
3824
金钱
2782
HASS币
0
发表于 2019-1-29 16:16:46 | 显示全部楼层 |阅读模式
小度使用baidu的tts,输入文字后无法自动播放,必须点播放/暂停两次才能开始播放,
QQ图片20190129161232.png


回复

使用道具 举报

5

主题

34

帖子

204

积分

论坛技术达人

积分
204
金钱
165
HASS币
20
发表于 2019-1-29 22:37:16 | 显示全部楼层
试试手动调用tts/baidu_say,还有我记得小度自己有dlna,你试着用论坛的开dlna教程让它自己扫描
回复

使用道具 举报

1

主题

107

帖子

763

积分

高级会员

Rank: 4

积分
763
金钱
656
HASS币
0
发表于 2019-1-30 09:06:54 | 显示全部楼层
你可以尝试用一下配置添加试试。
media_player:
  - platform: dlna_dmr
    url: http://小度ip:49494/description.xml

我用论坛里第三方的dlna也有你说的这种情况,好像是第三方在播放时没有没有调用stop。另外小度播放结束后不会自动停止,手动停止后自定义顶部绿的灯一直慢闪。只能用其他软件投停止才会灭。
回复

使用道具 举报

39

主题

1042

帖子

3824

积分

论坛元老

Rank: 8Rank: 8

积分
3824
金钱
2782
HASS币
0
 楼主| 发表于 2019-2-3 10:38:54 | 显示全部楼层
airow 发表于 2019-1-30 09:06
你可以尝试用一下配置添加试试。
media_player:
  - platform: dlna_dmr

media_player:
  - platform: dlna_dmr
    url: http://小度ip:49494/description.xml

这个  http://小度ip:49494/description.xml
文件去哪儿下载啊?
回复

使用道具 举报

1

主题

107

帖子

763

积分

高级会员

Rank: 4

积分
763
金钱
656
HASS币
0
发表于 2019-2-17 13:36:16 | 显示全部楼层
goldstep 发表于 2019-2-3 10:38
media_player:
  - platform: dlna_dmr
    url: http://小度ip:49494/description.xml

description.xml这个文件是小度音响DLNA的描述文件。改成音箱的ip就可以。
回复

使用道具 举报

39

主题

1042

帖子

3824

积分

论坛元老

Rank: 8Rank: 8

积分
3824
金钱
2782
HASS币
0
 楼主| 发表于 2019-2-18 10:36:05 | 显示全部楼层
本帖最后由 goldstep 于 2019-2-18 10:51 编辑
airow 发表于 2019-2-17 13:36
description.xml这个文件是小度音响DLNA的描述文件。改成音箱的ip就可以。
在浏览器中访问你说的这个url,直接打开xml文件以后,
显示如下:
QQ截图20190218105033.jpg

该怎么改啊
回复

使用道具 举报

1

主题

107

帖子

763

积分

高级会员

Rank: 4

积分
763
金钱
656
HASS币
0
发表于 2019-2-18 11:34:26 | 显示全部楼层
goldstep 发表于 2019-2-18 10:36
在浏览器中访问你说的这个url,直接打开xml文件以后,
显示如下:

直接用这个地址替换上边说的那个配置项。
回复

使用道具 举报

1

主题

107

帖子

763

积分

高级会员

Rank: 4

积分
763
金钱
656
HASS币
0
发表于 2019-2-18 11:37:41 | 显示全部楼层
本帖最后由 airow 于 2019-2-18 19:03 编辑

下面是我的“configuration.yaml”文件
homeassistant:
  # Name of the location where Home Assistant is running
  name: Home
  # Location required to calculate the time the sun rises and sets
  latitude: 46.67338029
  longitude: 216.93655286
  # Impacts weather/sunrise data (altitude above sea level in meters)
  elevation: 148
  # metric for Metric, imperial for Imperial
  unit_system: metric
  # Pick yours from here: 
  time_zone: Asia/Shanghai
  # Customization file
  customize: !include customize.yaml

http:
  base_url: hass.xxxx.xyz:8123  #访问地址,填入  DDNS 中设置的网址

# Show links to resources in log and frontend
introduction:

# Enables the frontend
frontend:

# Enables configuration UI
config:

# Uncomment this if you are using SSL/TLS, running in Docker container, etc.
# http:
#   base_url: example.duckdns.org:8123

# Checks for available updates
# Note: This component will send some information about your system to
# the developers to assist with development of Home Assistant.
# For more information, please see:
updater:
  # Optional, allows Home Assistant developers to focus on popular components.
  # include_used_components: true

# Discover some devices automatically
discovery:

media_player:
  - platform: dlna_dmr
    url: [url]http://192.168.2.184:49494/description.xml[/url]


# Allows you to issue voice commands from the frontend in enabled browsers
conversation:

# Enables support for tracking state changes over time
history:

# View all events in a logbook
logbook:

# Enables a map showing the location of tracked devices
map:

# Track the sun
sun:

# Sensors
sensor:
  # Weather prediction
  - platform: yr

# Text to speech
tts:
  # - platform: google
  - platform: baidu
    app_id: 15411849
    api_key: xxxxxxxxxxxxxxxxxxx
    secret_key: xxxxxxxxxxxxxxxxxxx
    speed: 5
    pitch: 5
    volume: 9
    person: 0

# Cloud
cloud:

group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml

aligenie:
  expire_hours: 180
dueros:
  expire_hours: 180


回复

使用道具 举报

1

主题

107

帖子

763

积分

高级会员

Rank: 4

积分
763
金钱
656
HASS币
0
发表于 2019-2-18 11:54:01 | 显示全部楼层
不要使用你之前的那个播放器测试,使用如下图这个播放器。“DLNA Digital Media Renderer”没有的话手动添加一下

TIM截图20190218115159.png
回复

使用道具 举报

39

主题

1042

帖子

3824

积分

论坛元老

Rank: 8Rank: 8

积分
3824
金钱
2782
HASS币
0
 楼主| 发表于 2019-2-18 14:36:17 | 显示全部楼层
airow 发表于 2019-2-18 11:54
不要使用你之前的那个播放器测试,使用如下图这个播放器。“DLNA Digital Media Renderer”没有的话手动添 ...

QQ图片20190218143400.png
实体里面没有找到你说的这个播放器!




再说你那个代码url格式是正确的吗?
QQ图片20190218143542.png




回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|Hassbian

GMT+8, 2024-4-19 17:45 , Processed in 0.706124 second(s), 34 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表