johnbartkiw / mycroft-skill-tunein

Add internet music streaming from tunein
MIT License
12 stars 14 forks source link

Stations not playing then Mycroft hangs? #9

Open hav0ck opened 4 years ago

hav0ck commented 4 years ago

I installed this skill last week and I haven't been able to get any station to play.

I've tried asking for a genre of music and specific stations to be played. I get a response that Mycroft is looking for what I asked, and then that it will start playing station YYYY.

But then nothing happens. In the CLI I see the same information and everything looks fine except when I say "Hey Mycroft" a second time. At this point (in the CLI) I can see Mycroft recognize the wake word but no listen chime is played, the mic levels drop and freeze and remains this way until I reboot the Pi. Shutting down or restarting Mycroft does not resolve the issue.

I am able to use the Latest News skill to stream a mp3 file from CBC so i think my MP3 playback is fine.

The only thing I've been able to find in the logs (audio.log) is this:

04:10:09.555 - urllib3.connectionpool - DEBUG - https://mimic-api.mycroft.ai:443 “GET /synthesize?text=Now%20playing%20boom%20101.9%20from%20tune%20in&visimes=True HTTP/1.1” 200 176417

mexican1973 commented 4 years ago

I have also seen this issue. Some times it does find the station but than cant play it for some reason. There should be an error handling for this situation. Something along the line like "An error occured while tryiong to start the URL for the station ... " Try to reproduce as follows_ You will have to type it in console because via voice it doesnt find it anyhow (has to be with "K") Play Klassik lounge

See the log for this error:

2020-01-01 18:54:08.031 | DEBUG | 750 | Playback Control Skill | CommonPlay Resolution: klassik lounge 2020-01-01 18:54:08.031 | DEBUG | 750 | Playback Control Skill | 0.55 using mycroft-skill-tunein.johnbartkiw 2020-01-01 18:54:08.032 | INFO | 750 | Playback Control Skill | Playing with: mycroft-skill-tunein.johnbartkiw 2020-01-01 18:54:08.182 | DEBUG | 750 | mycroft-skill-tunein_johnbartkiw:CPS_start:96 | CPS Start: klassik lounge 2020-01-01 18:54:08.184 | DEBUG | 750 | mycroft-skill-tunein_johnbartkiw:find_station:118 | pre-alias search_term: klassik lounge 2020-01-01 18:54:08.208 | DEBUG | 750 | mycroft-skill-tunein_johnbartkiw:stop:165 | Stopping stream 2020-01-01 18:54:08.210 | DEBUG | 750 | mycroft-skill-tunein_johnbartkiw:find_station:120 | aliased search_term: klassik lounge 2020-01-01 18:54:08.216 | DEBUG | 750 | urllib3.connectionpool | Starting new HTTP connection (1): opml.radiotime.com:80 2020-01-01 18:54:08.296 | INFO | 750 | Playback Control Skill | Audio service status: {} 2020-01-01 18:54:08.497 | DEBUG | 750 | urllib3.connectionpool | http://opml.radiotime.com:80 "POST /Search.ashx HTTP/1.1" 200 1216 2020-01-01 18:54:08.509 | DEBUG | 750 | urllib3.connectionpool | Starting new HTTP connection (1): opml.radiotime.com:80 2020-01-01 18:54:08.779 | DEBUG | 750 | urllib3.connectionpool | http://opml.radiotime.com:80 "GET /Tune.ashx?id=s250283 HTTP/1.1" 200 132 2020-01-01 18:54:13.917 | DEBUG | 750 | mycroft-skill-tunein_johnbartkiw:find_station:145 | Found stream URL: http://stream.klassikradio.de/lounge-beat/mp3-192/tunein/play High Performance MPEG 1.0/2.0/2.5 Audio Player for Layers 1, 2 and 3 version 1.25.10; written and copyright by Michael Hipp and others free software (LGPL) without any warranty but with best wishes [src/resolver.c:305] error: Resolving klassikradio.hoerradar.de:80: Name or service not known [src/httpget.c:606] error: Unable to establish connection to klassikradio.hoerradar.de main: [src/mpg123.c:685] error: Access to http resource http://stream.klassikradio.de/lounge-beat/mp3-192/tunein/play failed. 2020-01-01 18:54:20.072 | DEBUG | 750 | mycroft.enclosure.display_manager:remove_active:146 | Removing active skill...

andlo commented 4 years ago

some of this would be fixed by using audioservice and adding the content-type when it is missing from thestream as proposed in PR #7

johnbartkiw commented 4 years ago

I've updated the skill to utilize AudioService and it defaults to VLC which seems to provide a more stable experience. Please let me know if this fixes your issues.

mexican1973 commented 4 years ago

I reinstalled not the new picroft image form 10.01.2020 and now all stations working perfect also when typing: play "klassik lounge easy listening radio" Great station with calm lounge music for relaxing. give it a try.

johnbartkiw commented 4 years ago

Glad it's all finally working for you.

krywenko commented 4 years ago

how do you make it play with mpg123 if you wish not to use vlc as lost my option to process metadata. as I made companion skill for tunein that displays metadata via remote wireless screens -- or do you know how to pull metadata from vlc stream as I can not find any info