# TuneIn Internet Radio Streaming Skill - testing and feedback

**URL:** https://community.openconversational.ai/t/tunein-internet-radio-streaming-skill-testing-and-feedback/6016
**Category:** Feedback / Support
**Created:** [March 3, 2019, 8:27pm UTC](https://community.openconversational.ai/t/tunein-internet-radio-streaming-skill-testing-and-feedback/6016 "2019-03-03T20:27:06Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![johnbart](https://community.openconversational.ai/letter_avatar_proxy/v4/letter/j/c67d28/32.png) [@johnbart](https://community.openconversational.ai/u/johnbart)
#### Post date: [March 3, 2019, 8:27pm UTC](https://community.openconversational.ai/t/tunein-internet-radio-streaming-skill-testing-and-feedback/6016/1 "2019-03-03T20:27:06Z")

</div>

First time skill writer looking for feedback on this skill to play internet radio streams based on your search term.

#### How to install mycroft-skill-tunein

- Install mycroft-skill-tunein by
  - Using msm to install from my repo:

msm install [https://github.com/johnbartkiw/mycroft-skill-tunein](https://github.com/johnbartkiw/mycroft-skill-tunein)

- mycroft-skill-tunein connects to TuneIn Internet radio directory
  - This skill uses the public TuneIn web API that doesn’t require an account or any authentication.
  - There are no settings required for this skill

#### How to test mycroft-skill-tunein

After install there are no further steps to configure as there are no settings.

- Speak `Intent phrase “Stream” followed by a station name, number, genre, etc. to search for.

- Valid intent forms:

- “Stream KEXP”

- “Stream Jack FM Radio”

- “Stream Jazz 24 internet radio”

- “Stream 80s Metal (on|with|using) tune in”

- “Stream 70s Country radio (on|with|using) tune in”

- “Stream 99.9 internet radio (on|with|using) tune in”

- “Stream 107.7 radio station”

- “Stream NPR News internet radio station”

- “Stream KEXP radio station (on|with|using) tune in”

- “Stream KEXP internet radio station (on|with|using) tune in”

- Mycroft should say it’s starting to stream a station name and then the radio audio stream should start. If it can’t find any station that matches your search criteria then it will tell you that if couldn’t find any stations matching.

#### Where feedback on mycroft-skill-tunein should be directed:

Feel free to leave feedback here or as an issue on the github repo ([https://github.com/johnbartkiw/mycroft-skill-tunein/issues](https://github.com/johnbartkiw/mycroft-skill-tunein/issues))

---

<div class="post-metadata">

### Author: ![brrn](https://community.openconversational.ai/user_avatar/community.openconversational.ai/brrn/32/2264_2.png) [@brrn](https://community.openconversational.ai/u/brrn)
#### Post date: [March 3, 2019, 8:41pm UTC](https://community.openconversational.ai/t/tunein-internet-radio-streaming-skill-testing-and-feedback/6016/2 "2019-03-03T20:41:32Z")

</div>

Really love this skill with the few stations I tried (haven’t tried and categories like 80s metal)! Could you try to incorporate it with the [common play Framework](https://mycroft.ai/documentation/skills/common-play-framework/) - that way people just have to say “play”!

---

<div class="post-metadata">

### Author: ![andlo](https://community.openconversational.ai/user_avatar/community.openconversational.ai/andlo/32/860_2.png) [@andlo](https://community.openconversational.ai/u/andlo)
#### Post date: [March 3, 2019, 9:28pm UTC](https://community.openconversational.ai/t/tunein-internet-radio-streaming-skill-testing-and-feedback/6016/3 "2019-03-03T21:28:11Z")

</div>

I looove it to. Have send a PR with Danish translation and some other minor stuff.

Also opend to issues - one by some stations fails to play and another that I cant get it to stop. The last could be related to the fat I am using Danish on my mycroft device, and the stop skill mabe isnt working:)

---

<div class="post-metadata">

### Author: ![johnbart](https://community.openconversational.ai/letter_avatar_proxy/v4/letter/j/c67d28/32.png) [@johnbart](https://community.openconversational.ai/u/johnbart)
#### Post date: [March 4, 2019, 4:07am UTC](https://community.openconversational.ai/t/tunein-internet-radio-streaming-skill-testing-and-feedback/6016/4 "2019-03-04T04:07:41Z")

</div>

Thanks for the quick feedback! I’ll take a peek at the PR and I appreciate the translations.

I can’t repro the problem with not being able to stop a stream but I have seen another random station that wouldn’t play. I think that it may be the format of the stream not being compatible with the player. I’ll see if something like VLC can play those streams successfully.

I had originally tried to use the common play framework but wanted to get something working easily since this is my first shot at making a skill. I’ll see if I can get that incorporated now that I have basic intents working.

---

<div class="post-metadata">

### Author: ![Dominik](https://community.openconversational.ai/user_avatar/community.openconversational.ai/dominik/32/1936_2.png) [@Dominik](https://community.openconversational.ai/u/Dominik)
#### Post date: [March 4, 2019, 8:05am UTC](https://community.openconversational.ai/t/tunein-internet-radio-streaming-skill-testing-and-feedback/6016/5 "2019-03-04T08:05:02Z")

</div>

That is a really cool skill. Just found out that my favorite German music stations are available on TuneIn as well!

PR with German translation and .gitignore is waiting for you…

---

<div class="post-metadata">

### Author: ![andlo](https://community.openconversational.ai/user_avatar/community.openconversational.ai/andlo/32/860_2.png) [@andlo](https://community.openconversational.ai/u/andlo)
#### Post date: [March 4, 2019, 6:48pm UTC](https://community.openconversational.ai/t/tunein-internet-radio-streaming-skill-testing-and-feedback/6016/6 "2019-03-04T18:48:22Z")

</div>

The problem that some stations dosnt play seems to be that some stations uses .m3u file and not a plain mp3 file. So the play\_mp3 command just passes the url to the player (which on picroft and mark1 are mpg123.

mpg123 can pay streams from a mp3 right from the url. To play a m3u file there is need for parameter -@ as is told in the log.

But there dosnt seem to be a way to pass parameter to the mpg123 via the play\_mp3 function ☹

So I think there is thre waays to go….

Adding stuf to play the stream your self (look at the play\_mp3 funvtion and use that and add optional parameter)

Or if the url is a m3u - get it parse it and get the stream url and pass that to play\_mp3

Or make the changes to the play\_mp3 function in core so it can take optional parameterand.

---

<div class="post-metadata">

### Author: ![andlo](https://community.openconversational.ai/user_avatar/community.openconversational.ai/andlo/32/860_2.png) [@andlo](https://community.openconversational.ai/u/andlo)
#### Post date: [March 4, 2019, 7:13pm UTC](https://community.openconversational.ai/t/tunein-internet-radio-streaming-skill-testing-and-feedback/6016/7 "2019-03-04T19:13:55Z")

</div>

Or maybe just make a hack like this:

```auto
if self.stream_url[-3:] == 'm3u':
    self.process = play_mp3(self.stream_url[:-4])
else:
    self.process = play_mp3(self.stream_url)
return

```

on line 80

I notied that the stations I had problems whit used a url like this  
[http://live-icy.gss.dr.dk/A/A03H.mp3.m3u](http://live-icy.gss.dr.dk/A/A03H.mp3.m3u)  
and just by removing the last part it worked.

But maybe test with other stations and not only DR P1 like I have.

---

<div class="post-metadata">

### Author: ![johnbart](https://community.openconversational.ai/letter_avatar_proxy/v4/letter/j/c67d28/32.png) [@johnbart](https://community.openconversational.ai/u/johnbart)
#### Post date: [March 4, 2019, 9:23pm UTC](https://community.openconversational.ai/t/tunein-internet-radio-streaming-skill-testing-and-feedback/6016/8 "2019-03-04T21:23:21Z")

</div>

That all makes sense and I was able to repro. Give me a day or so to check out some other options before I go for the hack.

---

<div class="post-metadata">

### Author: ![johnbart](https://community.openconversational.ai/letter_avatar_proxy/v4/letter/j/c67d28/32.png) [@johnbart](https://community.openconversational.ai/u/johnbart)
#### Post date: [March 5, 2019, 11:11pm UTC](https://community.openconversational.ai/t/tunein-internet-radio-streaming-skill-testing-and-feedback/6016/9 "2019-03-05T23:11:08Z")

</div>

I’ve updated the skill to use the common play framework. My own testing appeared to work find but I honestly haven’t tested it enough with the other skills that utilize the framework to understand where it may fail.

I also changed the extension stripping code a bit to make it easier to add onto later.

---

<div class="post-metadata">

### Author: ![gez-mycroft](https://community.openconversational.ai/user_avatar/community.openconversational.ai/gez-mycroft/32/1937_2.png) [@gez-mycroft](https://community.openconversational.ai/u/gez-mycroft)
#### Post date: [March 6, 2019, 7:02am UTC](https://community.openconversational.ai/t/tunein-internet-radio-streaming-skill-testing-and-feedback/6016/10 "2019-03-06T07:02:13Z")

</div>

.pls files may also need to be handled differently

Triple J Uneartherd for example provides this url:  
[http://www.abc.net.au/res/streaming/audio-live/shout-mp3/unearthed.pls](http://www.abc.net.au/res/streaming/audio-live/shout-mp3/unearthed.pls)

which contains two usable streams, both play the same thing. So you would need to parse that file, and extract the stream url instead of using the playlist url.

Love this skill though. I’m such a lazy music lover, so much easier if someone else decides what songs I’m going to listen to 😄

---

<div class="post-metadata">

### Author: ![johnbart](https://community.openconversational.ai/letter_avatar_proxy/v4/letter/j/c67d28/32.png) [@johnbart](https://community.openconversational.ai/u/johnbart)
#### Post date: [March 6, 2019, 7:26am UTC](https://community.openconversational.ai/t/tunein-internet-radio-streaming-skill-testing-and-feedback/6016/11 "2019-03-06T07:26:44Z")

</div>

Thanks for the test case. I’ll see if I can get parsing of results that serve up a .pls file handled correctly.

---

<div class="post-metadata">

### Author: ![johnbart](https://community.openconversational.ai/letter_avatar_proxy/v4/letter/j/c67d28/32.png) [@johnbart](https://community.openconversational.ai/u/johnbart)
#### Post date: [March 6, 2019, 8:09am UTC](https://community.openconversational.ai/t/tunein-internet-radio-streaming-skill-testing-and-feedback/6016/12 "2019-03-06T08:09:35Z")

</div>

It was easier to get quick parsing together than I thought. I tested with normal mp3 streams, streams that return .m3u files and .pls files and it appears to work now. Let me know if there are any other broken test examples that you can find.

---

<div class="post-metadata">

### Author: ![andlo](https://community.openconversational.ai/user_avatar/community.openconversational.ai/andlo/32/860_2.png) [@andlo](https://community.openconversational.ai/u/andlo)
#### Post date: [March 6, 2019, 6:28pm UTC](https://community.openconversational.ai/t/tunein-internet-radio-streaming-skill-testing-and-feedback/6016/13 "2019-03-06T18:28:42Z")

</div>

Totaly great skill

Works super well on en-us, but I do have problems getting it to work on da-dk.

If saying  
“stream dr p1” he will play dr p1, but  
“spil dr p1” he answers that he cant find that station

Looking at the code to figure out gave me headace, as i am not well in regex, and I think it is the paring of the utterance that are different when using common\_play and or call the skill directly by the intent\_file\_handler

---

<div class="post-metadata">

### Author: ![johnbart](https://community.openconversational.ai/letter_avatar_proxy/v4/letter/j/c67d28/32.png) [@johnbart](https://community.openconversational.ai/u/johnbart)
#### Post date: [March 6, 2019, 7:07pm UTC](https://community.openconversational.ai/t/tunein-internet-radio-streaming-skill-testing-and-feedback/6016/14 "2019-03-06T19:07:38Z")

</div>

I’m assuming that spil is “play” in da-dk and that you’re testing the common play path?

Do you have translated regex’s locally since I don’t have those in the depot yet?

I’ve noticed that sometimes that particular regex can return no stations. I haven’t had time to dive into logs on a repro. I’ve had no problem with some of the longer regex matches. So in en-us something like:

“play KEXP on tune in” instead of just

"play KEXP:

---

<div class="post-metadata">

### Author: ![andlo](https://community.openconversational.ai/user_avatar/community.openconversational.ai/andlo/32/860_2.png) [@andlo](https://community.openconversational.ai/u/andlo)
#### Post date: [March 6, 2019, 7:11pm UTC](https://community.openconversational.ai/t/tunein-internet-radio-streaming-skill-testing-and-feedback/6016/15 "2019-03-06T19:11:54Z")

</div>

yes I have translated the regex localy, and PR them when I get it to work. And spil = play 🙂  
ti works for some stations but not the DR P1 and NPR news. Cant see any thing why…

and “spil dr p1 på tune in” (that is play dr p1 on tune in) dosnt work. But on my mark\_1 who speaks en-us it does work by “play dr p1” or “play dr p1 on tune in”

So it has to be someting regarding to the regex which I am not god at understanding.

---

<div class="post-metadata">

### Author: ![johnbart](https://community.openconversational.ai/letter_avatar_proxy/v4/letter/j/c67d28/32.png) [@johnbart](https://community.openconversational.ai/u/johnbart)
#### Post date: [March 6, 2019, 7:40pm UTC](https://community.openconversational.ai/t/tunein-internet-radio-streaming-skill-testing-and-feedback/6016/16 "2019-03-06T19:40:41Z")

</div>

I’m not a regex wizard either but hopefully we can figure this out. 🙂 A couple of questions:

1. Does that regex form work on other station names or do they all fail?
2. Does the regex still fail if you input the string via the cli instead of by voice?
3. What shows up in the debug log for the search term in that situation? (LOG.debug("Could not find a station with the query term: " + search\_term))

-j

---

<div class="post-metadata">

### Author: ![andlo](https://community.openconversational.ai/user_avatar/community.openconversational.ai/andlo/32/860_2.png) [@andlo](https://community.openconversational.ai/u/andlo)
#### Post date: [March 6, 2019, 7:48pm UTC](https://community.openconversational.ai/t/tunein-internet-radio-streaming-skill-testing-and-feedback/6016/17 "2019-03-06T19:48:50Z")

</div>

It seems that the data is “spil dr p1” and not as expected “dr p1” when this is called

```auto
 def CPS_start(self, phrase, data):
        LOG.debug("CPS Start: " + data)
        self.find_station(data)

```

---

<div class="post-metadata">

### Author: ![johnbart](https://community.openconversational.ai/letter_avatar_proxy/v4/letter/j/c67d28/32.png) [@johnbart](https://community.openconversational.ai/u/johnbart)
#### Post date: [March 6, 2019, 7:58pm UTC](https://community.openconversational.ai/t/tunein-internet-radio-streaming-skill-testing-and-feedback/6016/18 "2019-03-06T19:58:21Z")

</div>

Ok that may be a bug in the Common Play Framework then as the “Play” part of the request is supposed to be pulled off by that before it gets to this call. Can you check the repo for that to see if maybe they don’t support da-dk yet?

---

<div class="post-metadata">

### Author: ![andlo](https://community.openconversational.ai/user_avatar/community.openconversational.ai/andlo/32/860_2.png) [@andlo](https://community.openconversational.ai/u/andlo)
#### Post date: [March 6, 2019, 7:59pm UTC](https://community.openconversational.ai/t/tunein-internet-radio-streaming-skill-testing-and-feedback/6016/19 "2019-03-06T19:59:56Z")

</div>

ohhh yes - it donst support da-dk, as I am the one translating da-dk 😉 and just did translate it fast to test your great skill.  
But then I know where to look.

---

<div class="post-metadata">

### Author: ![andlo](https://community.openconversational.ai/user_avatar/community.openconversational.ai/andlo/32/860_2.png) [@andlo](https://community.openconversational.ai/u/andlo)
#### Post date: [March 6, 2019, 8:03pm UTC](https://community.openconversational.ai/t/tunein-internet-radio-streaming-skill-testing-and-feedback/6016/20 "2019-03-06T20:03:08Z")

</div>

and YES - I made a mistake in the trnslation in the common play skill…. your skill work great 🙂

[Next page](https://community.openconversational.ai/t/tunein-internet-radio-streaming-skill-testing-and-feedback/6016.md?page=2)
