Text2speech - Sprachausgabe via MyTTS funktioniert nur einmalig nach rereadcfg

Begonnen von Homalix99, 09 Dezember 2015, 09:31:32

Vorheriges Thema - Nächstes Thema

Homalix99

Hallo,
ich habe derzeit das Phänomen, dass die Sprachausgabe über MyTTS nicht mehr funktioniert.
Wenn ich fhem starte oder ein rereadcfg durchführe, kann ich einmalig den gesprochenen Text hören, wobei das Log schon sehr seltsam aussieht (siehe "Gut"fall)
2015.12.09 08:43:33.426 4: FHEMWEB:192.168.3.10:57628 POST /fhem&detail=MyTTS&dev.setMyTTS=MyTTS&cmd.setMyTTS=set&arg.setMyTTS=tts&val.setMyTTS=hallo; BUFLEN:0
2015.12.09 08:43:33.445 4: MyTTS: Auflistung der Textbausteine nach Aufbereitung:
2015.12.09 08:43:33.447 4: MyTTS: 0 => hallo
2015.12.09 08:43:33.469 4: BlockingCall (Text2Speech_DoIt) created child (9360), uses telnetForBlockingFn to connect back
2015.12.09 08:43:33.501 4: Connection closed for FHEMWEB:192.168.3.10:57634: EOF
2015.12.09 08:43:33.504 4: Verwende TTS Spracheinstellung: Deutsch
2015.12.09 08:43:33.511 4: Text2Speech: Bearbeite jetzt den Text: hallo
2015.12.09 08:43:33.513 4: Text2Speech: Textbaustein ist keine direkte MP3 Datei, ermittle MD5 CacheNamen: 4ee34d8b9472a513fc8eed96cb3ab001.mp3
2015.12.09 08:43:33.521 4: Text2Speech: Verwende Google OnlineResource zum Download
2015.12.09 08:43:33.527 4: Text2Speech: Hole URL: http://translate.google.com/translate_tts?tl=de&client=tw-ob&q=hallo
2015.12.09 08:43:33.530 4: HttpUtils url=http://translate.google.com/translate_tts?tl=de&client=tw-ob&q=hallo
2015.12.09 08:43:33.526 4: FHEMWEB:192.168.3.10:57628 GET /fhem?detail=MyTTS&fw_id=; BUFLEN:0
2015.12.09 08:43:33.653 4: name: /fhem?detail=MyTTS&fw_id= / RL:3323 / text/html; charset=UTF-8 / Content-Encoding: gzip
/
2015.12.09 08:43:33.671 4: dummy set fp_time 08:43
2015.12.09 08:43:33.738 4: http://translate.google.com/translate_tts?tl=de&client=tw-ob&q=hallo: HTTP response code 200
2015.12.09 08:43:33.740 4: HttpUtils http://translate.google.com/translate_tts?tl=de&client=tw-ob&q=hallo: Got data, length: 2736
2015.12.09 08:43:33.746 4: Text2Speech: Schreibe mp3 in die Datei cache/4ee34d8b9472a513fc8eed96cb3ab001.mp3 mit 2736 Bytes
2015.12.09 08:43:33.743 4: FHEMWEB:192.168.3.10:57628 GET /fhem/attr; BUFLEN:0
2015.12.09 08:43:33.764 4: Text2Speech_CalcMP3Duration: cache/4ee34d8b9472a513fc8eed96cb3ab001.mp3 hat eine Länge von 1 Sekunden.
2015.12.09 08:43:33.767 1: PERL WARNING: Use of uninitialized value in concatenation (.) or string at FHEM/Blocking.pm line 107.
2015.12.09 08:43:33.795 1: BlockingInformParent (Text2Speech_readingsSingleUpdateByName): Can't connect to localhost:: IO::Socket::INET: Bad hostname 'localhost:'
2015.12.09 08:43:33.814 4: name: /fhem/attr / RL:1276 / text/html; charset=UTF-8 / Content-Encoding: gzip
/
2015.12.09 08:43:33.817 1: BlockingInformParent (Text2Speech_readingsSingleUpdateByName): Can't connect to localhost:: IO::Socket::INET: Bad hostname 'localhost:'
2015.12.09 08:43:33.819 4: Text2Speech:/usr/bin/mplayer -ao alsa:device=hw=0.0  -nolirc -noconsolecontrols cache/4ee34d8b9472a513fc8eed96cb3ab001.mp3
2015.12.09 08:43:33.843 4: FHEMWEB:192.168.3.10:57631 GET /fhem/codemirrorParam; BUFLEN:0
2015.12.09 08:43:33.915 4: name: /fhem/codemirrorParam / RL:1275 / text/html; charset=UTF-8 / Content-Encoding: gzip
/
2015.12.09 08:43:33.933 4: FHEMWEB:192.168.3.10:57642 GET /fhem/; BUFLEN:0
2015.12.09 08:43:34.019 4: name: /fhem/ / RL:1276 / text/html; charset=UTF-8 / Content-Encoding: gzip
/
2015.12.09 08:43:34.024 4: Connection accepted from FHEMWEB:192.168.3.10:57646
2015.12.09 08:43:34.032 4: FHEMWEB:192.168.3.10:57636 GET /fhem/%7B; BUFLEN:0
2015.12.09 08:43:34.117 4: name: /fhem/%7B / RL:1276 / text/html; charset=UTF-8 / Content-Encoding: gzip
/
2015.12.09 08:43:34.133 4: FHEMWEB:192.168.3.10:57639 GET /fhem/WEB; BUFLEN:0
2015.12.09 08:43:34.215 4: name: /fhem/WEB / RL:1276 / text/html; charset=UTF-8 / Content-Encoding: gzip
/
2015.12.09 08:43:34.225 4: FHEMWEB:192.168.3.10:57646 GET /fhem/%7D; BUFLEN:0
2015.12.09 08:43:34.319 4: name: /fhem/%7D / RL:1276 / text/html; charset=UTF-8 / Content-Encoding: gzip
/
2015.12.09 08:43:34.361 4: FHEMWEB:192.168.3.10:57628 GET /fhem/; BUFLEN:0
2015.12.09 08:43:34.438 4: name: /fhem/ / RL:1276 / text/html; charset=UTF-8 / Content-Encoding: gzip
/
2015.12.09 08:43:34.544 4: FHEMWEB:192.168.3.10:57628 GET /fhem?cmd={ReadingsVal(%22MyTTS%22,%22tts%22,%22%22)}&XHR=1; BUFLEN:0
2015.12.09 08:43:34.593 4: name: /fhem?cmd={ReadingsVal(%22MyTTS%22,%22tts%22,%22%22)}&XHR=1 / RL:21 / text/plain; charset=UTF-8 / Content-Encoding: gzip
/
2015.12.09 08:43:34.602 4: FHEMWEB:192.168.3.10:57639 GET /fhem?cmd={AttrVal(%22MyTTS%22,%22room%22,%22%22)}&XHR=1; BUFLEN:0
2015.12.09 08:43:34.662 4: name: /fhem?cmd={AttrVal(%22MyTTS%22,%22room%22,%22%22)}&XHR=1 / RL:29 / text/plain; charset=UTF-8 / Content-Encoding: gzip
/
MPlayer svn r34540 (Raspbian), built with gcc-4.6 (C) 2000-2012 MPlayer Team

Playing cache/4ee34d8b9472a513fc8eed96cb3ab001.mp3.
libavformat version 53.21.1 (external)
Mismatching header version 53.19.0
Audio only file format detected.
Load subtitles in cache/
==========================================================================
Requested audio codec family [mpg123] (afm=mpg123) not available.
Enable it at compilation.
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
libavcodec version 53.35.0 (external)
Mismatching header version 53.32.2
AUDIO: 16000 Hz, 1 ch, floatle, 32.0 kbit/6.25% (ratio: 4000->64000)
Selected audio codec: [ffmp3float] afm: ffmpeg (FFmpeg MPEG layer-3 audio)
==========================================================================
[AO_ALSA] Format floatle is not supported by hardware, trying default.
AO: [alsa] 16000Hz 1ch s16le (2 bytes per sample)
Video: no video
Starting playback...
A:   0.2 (00.2) of 0.7 (00.6)  1.2%

2015.12.09 08:43:35.507 4: FHEMWEB:192.168.3.10:57631 GET /fhem?XHR=1&inform=type=status;filter=MyTTS;since=1449647012;fmt=JSON&fw_id=428&timestamp=1449647013264; BUFLEN:0

Exiting... (End of file)


Bei erneutem Aufruf sieht das Log dann so aus:
2015.12.09 08:54:58.467 4: Connection closed for FHEMWEB:192.168.3.10:58090: EOF
2015.12.09 08:54:58.487 4: FHEMWEB:192.168.3.10:58173 POST /fhem&fw_id=431&cmd=set+MyTTS+tts+hallo; BUFLEN:0
2015.12.09 08:54:58.516 4: MyTTS: Auflistung der Textbausteine nach Aufbereitung:
2015.12.09 08:54:58.519 4: MyTTS: 0 => ARRAY(0x17994d0)
2015.12.09 08:54:58.520 4: MyTTS: 1 => hallo
2015.12.09 08:54:58.542 4: FHEMWEB:192.168.3.10:58176 GET /fhem?fw_id=431; BUFLEN:0
2015.12.09 08:54:58.583 4: name: /fhem?fw_id=431 / RL:1278 / text/html; charset=UTF-8 / Content-Encoding: gzip
/
2015.12.09 08:54:58.644 4: FHEMWEB:192.168.3.10:58176 GET /fhem/codemirrorParam; BUFLEN:0
2015.12.09 08:54:58.688 4: name: /fhem/codemirrorParam / RL:1279 / text/html; charset=UTF-8 / Content-Encoding: gzip
/
2015.12.09 08:54:58.695 4: FHEMWEB:192.168.3.10:58173 GET /fhem/WEB; BUFLEN:0
2015.12.09 08:54:58.739 4: name: /fhem/WEB / RL:1278 / text/html; charset=UTF-8 / Content-Encoding: gzip
/
2015.12.09 08:54:58.744 4: Connection accepted from FHEMWEB:192.168.3.10:58179
2015.12.09 08:54:58.750 4: FHEMWEB:192.168.3.10:58093 GET /fhem/attr; BUFLEN:0
2015.12.09 08:54:58.792 4: name: /fhem/attr / RL:1278 / text/html; charset=UTF-8 / Content-Encoding: gzip
/
2015.12.09 08:54:58.800 4: FHEMWEB:192.168.3.10:58179 GET /fhem/%7B; BUFLEN:0
2015.12.09 08:54:58.841 4: name: /fhem/%7B / RL:1279 / text/html; charset=UTF-8 / Content-Encoding: gzip
/
2015.12.09 08:54:58.846 4: Connection accepted from FHEMWEB:192.168.3.10:58182
2015.12.09 08:54:58.852 4: FHEMWEB:192.168.3.10:58176 GET /fhem/%7D; BUFLEN:0
2015.12.09 08:54:58.893 4: name: /fhem/%7D / RL:1279 / text/html; charset=UTF-8 / Content-Encoding: gzip
/
2015.12.09 08:54:58.903 4: FHEMWEB:192.168.3.10:58182 GET /fhem/; BUFLEN:0
2015.12.09 08:54:58.944 4: name: /fhem/ / RL:1278 / text/html; charset=UTF-8 / Content-Encoding: gzip
/
2015.12.09 08:54:58.980 4: FHEMWEB:192.168.3.10:58179 GET /fhem/; BUFLEN:0
2015.12.09 08:54:59.021 4: name: /fhem/ / RL:1279 / text/html; charset=UTF-8 / Content-Encoding: gzip
/
2015.12.09 08:54:59.156 4: FHEMWEB:192.168.3.10:58176 GET /fhem?XHR=1&inform=type=status;filter=;since=1449647697;fmt=JSON&fw_id=431&timestamp=1449647697823; BUFLEN:0
2015.12.09 08:55:28.642 4: dummy set fp_time 08:55
2015.12.09 08:55:34.079 4: dummy set HZ_Vorlauftemp 48.6
2015.12.09 08:55:34.138 4: dummy set Warmwassertemp 51.2
2015.12.09 08:55:34.162 4: dummy set HZ_Ruecklauftemp 40.9


Bin ziemlich ratlos, woran das liegen könnte.
Wenn ich die mp3 files aus dem /opt/fhem/cache in einer ssh Shell mit mplayer Aufruf starte, funktioniert die Ansage.
Hier noch die Config von MyTTS:

define MyTTS Text2Speech hw=0.0
attr MyTTS TTS_MplayerCall /usr/bin/mplayer
attr MyTTS TTS_UseMP3Wrap 1
attr MyTTS group Ausgabe_Signale
attr MyTTS icon audio_sound
attr MyTTS room Testraum
attr MyTTS verbose 4
- RPI 4 fhem in Docker, 2 x Arduino Uno, HM-GW, HM-Dev. (Fensterkontakte, HK-Thermostate, div. Aktoren), JeeLink,
- GPIOs, HM-LAN, ESPs (MQTT2)
-Überwachung Fenster/Türen/Licht, HK-Thermostatregelung, Rollosteuerung, Überw. Betriebstemperaturen Heizung, Erfassung Gas/Wasser, PV-Anl., Wetter (WS1600)

c2j2

Bei mir auch.

Da hat das was mit dem telnetPort zu tun - wenn ich den aus der fhem.cfg rauskommentiere, geht's.

Go figure.