Open linxingyulxy opened 6 years ago
I have the same problem。
Same problem here. Was working fine befor on raspbian jessy+python3.4. But today switched to stretch (clean install). BT audio output is working (aplay, vlc) but the component throws an error. Seems the component needs an update
Jan 31 20:57:42 hass hass[330]: MPlayer 1.3.0 (Debian), built with gcc-6.2.1 (C) 2000-2016 MPlayer Team
Jan 31 20:57:42 hass hass[330]: do_connect: could not connect to socket
Jan 31 20:57:42 hass hass[330]: connect: No such file or directory
Jan 31 20:57:42 hass hass[330]: Failed to open LIRC support. You will not be able to use your remote control.
Jan 31 20:57:42 hass hass[330]: Terminal type `unknown' is not defined.
Jan 31 20:57:42 hass hass[330]: Playing /home/homeassistant/.homeassistant/tts/xxxx774fef38c66f253768fd2d9b72a02a449fa9_ru_-_google.mp3.
Jan 31 20:57:42 hass hass[330]: libavformat version 57.56.101 (external)
Jan 31 20:57:42 hass hass[330]: Mismatching header version 57.56.100
Jan 31 20:57:42 hass hass[330]: Audio only file format detected.
Jan 31 20:57:42 hass hass[330]: Load subtitles in /home/homeassistant/.homeassistant/tts/
Jan 31 20:57:42 hass hass[330]: ==========================================================================
Jan 31 20:57:42 hass hass[330]: Opening audio decoder: [mpg123] MPEG 1.0/2.0/2.5 layers I, II, III
Jan 31 20:57:42 hass hass[330]: AUDIO: 24000 Hz, 2 ch, s16le, 32.0 kbit/4.17% (ratio: 4000->96000)
Jan 31 20:57:42 hass hass[330]: Selected audio codec: [mpg123] afm: mpg123 (MPEG 1.0/2.0/2.5 layers I, II, III)
Jan 31 20:57:42 hass hass[330]: ==========================================================================
Jan 31 20:57:42 hass hass[330]: AO: [pulse] Init failed: No such entity
Jan 31 20:57:42 hass hass[330]: Failed to initialize audio driver 'pulse::bluez_sink.xx_xx_EF_D2_00_96'
Jan 31 20:57:42 hass hass[330]: Could not open/initialize audio device -> no sound.
Jan 31 20:57:42 hass hass[330]: Audio: no sound
Jan 31 20:57:42 hass hass[330]: Video: no video
Jan 31 20:57:42 hass hass[330]: Exiting... (End of file)
Fixed by putting the config like this
I believe the PR would be an easy one
Hello,I use this plugin in Hassbian stretch. now i can connect to th bluetooth Speaker, and use "mplayer *.mp3" to play tts in bluetooth speaker.But it doesn't work in homeassistant, can you help me?
Dec 16 12:38:11 hassbian hass[1203]: 2017-12-16 12:38:11 INFO (Thread-9) [custom_components.media_player.tts_bluetooth_speaker] play_media: http://192.168.0.119:8123/api/tts_proxy/7d385d128cc4a59fa5ddb0211327c11b3f70f113_zh_-_baidu.mp3 Dec 16 12:38:11 hassbian hass[1203]: MPlayer 1.3.0 (Debian), built with gcc-6.2.1 (C) 2000-2016 MPlayer Team Dec 16 12:38:11 hassbian hass[1203]: do_connect: could not connect to socket Dec 16 12:38:11 hassbian hass[1203]: connect: No such file or directory Dec 16 12:38:11 hassbian hass[1203]: Failed to open LIRC support. You will not be able to use your remote control. Dec 16 12:38:11 hassbian hass[1203]: Terminal type `unknown' is not defined. Dec 16 12:38:11 hassbian hass[1203]: Playing /home/homeassistant/.homeassistant/tts/7d385d128cc4a59fa5ddb0211327c11b3f70f113zh-_baidu.mp3. Dec 16 12:38:11 hassbian hass[1203]: libavformat version 57.56.101 (external) Dec 16 12:38:11 hassbian hass[1203]: Mismatching header version 57.56.100 Dec 16 12:38:11 hassbian hass[1203]: Audio only file format detected. Dec 16 12:38:11 hassbian hass[1203]: Load subtitles in /home/homeassistant/.homeassistant/tts/ Dec 16 12:38:11 hassbian hass[1203]: ========================================================================== Dec 16 12:38:11 hassbian hass[1203]: Opening audio decoder: [mpg123] MPEG 1.0/2.0/2.5 layers I, II, III Dec 16 12:38:11 hassbian hass[1203]: AUDIO: 16000 Hz, 2 ch, s16le, 16.0 kbit/3.12% (ratio: 2000->64000) Dec 16 12:38:11 hassbian hass[1203]: Selected audio codec: [mpg123] afm: mpg123 (MPEG 1.0/2.0/2.5 layers I, II, III) Dec 16 12:38:11 hassbian hass[1203]: ========================================================================== Dec 16 12:38:11 hassbian hass[1203]: AO: [pulse] Init failed: No such entity Dec 16 12:38:11 hassbian hass[1203]: Failed to initialize audio driver 'pulse::bluez_sink.96_13_5A_00_4E_1B.a2dp_sink' Dec 16 12:38:11 hassbian hass[1203]: Could not open/initialize audio device -> no sound. Dec 16 12:38:11 hassbian hass[1203]: Audio: no sound Dec 16 12:38:11 hassbian hass[1203]: Video: no video Dec 16 12:38:11 hassbian hass[1203]: Exiting... (End of file)