Giter Club home page Giter Club logo

skill-npr-news's Introduction

Latest news

Listen to the latest news report from your favorite broadcast

About

Play the latest news from an RSS audio feed. Your device location will be used to provide a local feed from your country if available. Otherwise, the National Public Radio (NPR) Hourly News will be used. You can also choose your own default or add a custom audio feed at: home.mycroft.ai.

Supported stations include:

  • Associated Press (AP) Hourly Radio News
  • [AU] ABC News Australia
  • [BE] VRT Nieuws
  • [CA] CBC News
  • [DE] DLF
  • [DE] WDR
  • [FI] YLE
  • [SE] Ekot
  • [UK] BBC News
  • [US] Fox News
  • [US] NPR News Now
  • [US] PBS NewsHour

Examples

  • "Play the news"
  • "Play the BBC news"
  • "Tell me the news"
  • "What's the news?"
  • "Restart news"

Credits

Mycroft AI (@MycroftAI)

Category

Daily Information

Tags

#news #headlines

skill-npr-news's People

Contributors

andlo avatar augustnmonteiro avatar btotharye avatar dave-esch avatar denics avatar dschweppe avatar forslund avatar goroboro avatar gras64 avatar j1nx avatar justinlynn avatar kathyreid avatar krisgesling avatar learnedvector avatar mantasbandonis avatar matthewscholefield avatar penrods avatar thrilway avatar valdr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

skill-npr-news's Issues

FOX News Feed is broken

Describe the bug
Fox News is not being streamed, (and no visual ad either) -if 'what's the news'
IF 'play the news' - get the Fox splash screen visual but no audio
*
splash screen never cleared (?? dependent on audio stream) after a few minutes!!!

To Reproduce
Steps to reproduce the behavior:

  1. Set News source to Fox News on home.mycroft.ai account - skill setting
  2. ASK for the news - two different results with two different requests

Expected behavior
an audio stream and a splash screen on the display in either case

Log files
SKills.log is upto 11MB - not sending right now

here they are
big_files.tar.gz

Environment (please complete the following information):

  • Device type: Mark ][ -DevKit, on network cable
  • OS: default
  • Mycroft-core version: 21.02
  • Other versions: latest 07-03 01:30:22

Additional context
Been broken last 'latest' also

curl - messing things up

I was adding more streams and came across examples where curl messes things up...

i think curl should not be used at all, why cant the audio service handle the streams?

i assume this is for compatibility with the simple backend, but in that case curl should be baked in into it, I am using vlc and find the curl usage quite bad

suggestion:

  • add http/https support directly to simple audio backend using curl
  • remove curl usage across skills
  • make vlc the default backend

workaround: https://github.com/MycroftAI/skill-npr-news/pull/102/files#diff-8e2c1f727276d30ced72fa67cb848772a9802162bec39b42a8df5359fd063a4cR180

Can't start the skill - TypeError: '>' not supported between instances of 'list' and 'int'

Describe the bug
Mycroft consistently fails to start this skill and throws a python error:
TypeError: '>' not supported between instances of 'list' and 'int'

To Reproduce
Steps to reproduce the behavior:
Install the news still and watch the logs. The skill never gets enabled.

Log files
`
19:34:08.038 | INFO | 763 | NewsSkill | Creating custom News Station from Skill settings.

  File "/home/pi/mycroft-core/mycroft/skills/skill_loader.py", line 307, in _create_skill_instance
    self.instance.initialize()
  File "/opt/mycroft/skills/mycroft-npr-news.mycroftai/__init__.py", line 50, in initialize
    self.on_websettings_changed()
  File "/opt/mycroft/skills/mycroft-npr-news.mycroftai/__init__.py", line 78, in on_websettings_changed
    create_custom_station(custom_url)
  File "/opt/mycroft/skills/mycroft-npr-news.mycroftai/stations/station.py", line 146, in create_custom_station
    is_rss_feed = feedparser.parse(station_url).entries > 0
TypeError: '>' not supported between instances of 'list' and 'int'
`

If you are running Mycroft, the [Support Skill](https://github.com/MycroftAI/skill-support) helps to automate gathering this information. Simply say "Create a support ticket" and the Skill will put together a support package and email it to you.

**Environment (please complete the following information):**
 - Device type: Raspberry Pi 4
 - OS: Picroft
 - Mycroft-core version: 21.2.2

**Additional context**
I tried to set up a custom new source but reverted back to the default files. Things worked for awhile until I did this. Now I can't get it to work again, even though I've reverted back to the 21.02 branch.
I suspect that it's getting a bad setting from home.mycroft.ai, but I can't access the News settings there anymore to revert the setting back to the default. I'm stuck.

Can't choose where the news plays

Describe the bug
When I play BBC News, it plays on my connected analog speaker. When I play NPR News, it goes looking for an audio sink on my network and never plays on my connected speaker. This doesn't seem to be selectable or configurable, so I can't play NPR News on my Picroft's connected speaker.

At first, it played on my bedroom speaker, which I don't want because it's not useful to play in a different room from where I made the request. I rebooted the bedroom speaker, hoping that would tell Mycroft to use the local speaker. Instead, it now plays NPR News nowhere, it just silently sends the audio somewhere I can't hear it. But I can still hear BBC News.

To Reproduce
Steps to reproduce the behavior:

  1. "Hey Mycroft, play NPR News."

Expected behavior
Should play NPR News on the connected speaker. Doesn't.

Log files
If possible, add log files from /var/log/mycroft/ to help explain your problem.

Before rebooting bedroom speaker:

2022-04-14 22:42:57.108 | INFO     |  1603 | mycroft.audio.audioservice:get_serv
ices:63 | Loading services from /home/pi/mycroft-core/mycroft/audio/services/
2022-04-14 22:42:57.111 | INFO     |  1603 | mycroft.audio.audioservice:load_int
ernal_services:135 | Loading chromecast
2022-04-14 22:43:05.286 | INFO     |  1603 | pychromecast | Querying device stat
us
2022-04-14 22:43:05.410 | INFO     |  1603 | audioservice_chromecast:autodetect:
165 | Bedroom speaker found.

After rebooting bedroom speaker:

2022-04-16 04:28:08.453 | INFO     |   754 | mycroft.audio.speech:mute_and_speak:127 | Speak: Here is this hour's news on NPR News Now.
Playing WAVE '/tmp/mycroft/cache/tts/Mimic2/fd290cffb5c9e64d8f4c14e5a3bd3055.wav' : Signed 16 bit Little Endian, Rate 22000 Hz, Mono
2022-04-16 04:28:11.826 | INFO     |   754 | audioservice_chromecast:supported_uris:67 | Chromecasts found: Chromecast('192.168.1.81', port=8009, device=DeviceStatus(friendly_name='Bedroom speaker', model_name='Google Home Mini', manufacturer='Unknown manufacturer', uuid=UUID('cab5b072-4ff6-9c46-8763-75d1aa303f04'), cast_type='audio'))
2022-04-16 04:28:11.888 | INFO     |   754 | audioservice_chromecast:supported_uris:67 | Chromecasts found: Chromecast('192.168.1.81', port=8009, device=DeviceStatus(friendly_name='Bedroom speaker', model_name='Google Home Mini', manufacturer='Unknown manufacturer', uuid=UUID('cab5b072-4ff6-9c46-8763-75d1aa303f04'), cast_type='audio'))
2022-04-16 04:28:12.322 | INFO     |   754 | pychromecast | Quiting current app
2022-04-16 04:28:12.322 | INFO     |   754 | pychromecast.controllers | Receiver:Stopping current app 'None'
2022-04-16 04:28:12.348 | INFO     |   754 | pychromecast.controllers | Receiver:Launching app CC1AD845
2022-04-16 04:28:45.987 | INFO     |   754 | pychromecast | Quiting current app
2022-04-16 04:28:45.987 | INFO     |   754 | pychromecast.controllers | Receiver:Stopping current app 'CC1AD845'
2022-04-16 04:28:45.989 | INFO     |   754 | mycroft.audio.audioservice:_stop:354 | END Stop
2022-04-16 04:28:51.579 | ERROR    |   754 | concurrent.futures | exception calling callback for <Future at 0xb11e9350 state=finished raised AttributeError>
Traceback (most recent call last):
  File "/usr/lib/python3.7/concurrent/futures/_base.py", line 324, in _invoke_callbacks
    callback(self)
  File "/home/pi/mycroft-core/.venv/lib/python3.7/site-packages/pyee/_executor.py", line 56, in _callback
    self.emit('error', exc)
  File "/home/pi/mycroft-core/.venv/lib/python3.7/site-packages/pyee/_base.py", line 116, in emit
    self._emit_handle_potential_error(event, args[0] if args else None)
  File "/home/pi/mycroft-core/.venv/lib/python3.7/site-packages/pyee/_base.py", line 86, in _emit_handle_potential_error
    raise error
  File "/usr/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/home/pi/mycroft-core/mycroft/audio/audioservice.py", line 395, in _restore_volume_after_record
    restore_volume()
  File "/home/pi/mycroft-core/mycroft/audio/audioservice.py", line 387, in restore_volume
    self.current.restore_volume()
AttributeError: 'NoneType' object has no attribute 'restore_volume'
2022-04-16 04:29:06.213 | WARNING  |   754 | pychromecast.socket_client | [192.168.1.81:8009] Heartbeat timeout, resetting connection
2022-04-16 04:29:06.213 | WARNING  |   754 | pychromecast.socket_client | [192.168.1.81:8009] Heartbeat timeout, resetting connection
2022-04-16 04:29:11.223 | ERROR    |   754 | pychromecast.socket_client | [192.168.1.81:8009] Failed to connect, retrying in 2.0s
2022-04-16 04:29:18.231 | ERROR    |   754 | pychromecast.socket_client | [192.168.1.81:8009] Failed to connect. No retries.
2022-04-16 04:29:21.522 | INFO     |   754 | mycroft.audio.speech:mute_and_speak:127 | Speak: Here is this hour's news on NPR News Now.
2022-04-16 04:29:21.526 | INFO     |   754 | mycroft.tts.tts:_get_sentence_from_cache:407 | Found fd290cffb5c9e64d8f4c14e5a3bd3055.wav in TTS cache

You may also include screenshots, however screenshots of log files are often difficult to read and parse.

If you are running Mycroft, the Support Skill helps to automate gathering this information. Simply say "Create a support ticket" and the Skill will put together a support package and email it to you.

Environment (please complete the following information):

  • Device type: Raspberry Pi 4
  • OS: Picroft
  • Mycroft-core version: 21.02 Release 2

Additional context
It used to always play on the bedroom speaker (which I didn't want). I rebooted the bedroom speaker, and now it plays nowhere.

Please think carefully about whether you have modified anything in Mycroft's code or configuration files. If so, can you reproduce this on a clean installation of Mycroft? Many "bugs" turn out to be non-standard configuration errors.

ABC news Australia not working

Describe the bug
I ask Mycroft "what's the news" and Mycroft says "Here is this hour's news on ABC News Australia.", but nothing plays. I can see in the logs that the download is happening and it's attempting to play.

To Reproduce
Steps to reproduce the behavior:

  1. Set location to Australia
  2. Say "hey mycroft, what's the news"

Expected behavior
ABC news update should play

Log files

I asked Mycroft to read the news and sing to make sure the audio was working, I think this is the relevant bit from audio.log:

/var/log/mycroft/audio.log
2021-08-04 09:39:59.560 | INFO     |   730 | audioservice_simple:stop:167 | SimpleAudioServiceStop
2021-08-04 09:39:59.564 | INFO     |   730 | audioservice_simple:add_list:79 | Track list is [['file:///tmp/mycroft/cache/NewsSkill/stream', 'audio/mpeg']]
2021-08-04 09:39:59.565 | INFO     |   730 | audioservice_simple:play:162 | Call SimpleAudioServicePlay
2021-08-04 09:39:59.592 | INFO     |   730 | audioservice_simple:_play:97 | SimpleAudioService._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

Directory: /tmp/mycroft/cache/NewsSkill/
Playing MPEG stream 1 of 1: stream ...
Note: Illegal Audio-MPEG-Header 0x00000000 at offset 191.
Note: Trying to resync...
Note: Hit end of (available) data during resync.

[0:01] Decoding of stream finished.
2021-08-04 09:40:37.036 | INFO     |   730 | mycroft.audio.speech:mute_and_speak:127 | Speak: Here is this hour's news on ABC News Australia.
Playing WAVE '/tmp/mycroft/cache/tts/Mimic/eab8e3fd5522993e6289713ad564829d.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Mono
2021-08-04 09:40:42.035 | INFO     |   730 | audioservice_simple:stop:167 | SimpleAudioServiceStop
2021-08-04 09:40:42.046 | INFO     |   730 | audioservice_simple:add_list:79 | Track list is [['file:///tmp/mycroft/cache/NewsSkill/stream', 'audio/mpeg']]
2021-08-04 09:40:42.049 | INFO     |   730 | audioservice_simple:play:162 | Call SimpleAudioServicePlay
2021-08-04 09:40:42.064 | INFO     |   730 | audioservice_simple:_play:97 | SimpleAudioService._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

Directory: /tmp/mycroft/cache/NewsSkill/
Playing MPEG stream 1 of 1: stream ...
Note: Illegal Audio-MPEG-Header 0x00000000 at offset 191.
Note: Trying to resync...
Note: Hit end of (available) data during resync.

[0:01] Decoding of stream finished.
2021-08-04 09:41:04.003 | INFO     |   730 | mycroft.audio.speech:mute_and_speak:127 | Speak: I'm a bit nervous about my voice, but here goes nothing.
Playing WAVE '/tmp/mycroft/cache/tts/Mimic/5ad263cceb29e51b701eea5b135864f3.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Mono
2021-08-04 09:41:09.010 | INFO     |   730 | audioservice_simple:stop:167 | SimpleAudioServiceStop
2021-08-04 09:41:09.015 | INFO     |   730 | audioservice_simple:add_list:79 | Track list is ['file:///opt/mycroft/skills/mycroft-singing.mycroftai/popey-favourite.mp3']
2021-08-04 09:41:09.017 | INFO     |   730 | audioservice_simple:play:162 | Call SimpleAudioServicePlay
2021-08-04 09:41:09.028 | INFO     |   730 | audioservice_simple:_play:97 | SimpleAudioService._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

Directory: /opt/mycroft/skills/mycroft-singing.mycroftai/
Playing MPEG stream 1 of 1: popey-favourite.mp3 ...

MPEG 1.0 L III vbr 48000 j-s

2021-08-04 09:41:20.957 | INFO     |   730 | audioservice_simple:stop:167 | SimpleAudioServiceStop
2021-08-04 09:41:22.162 | INFO     |   730 | mycroft.audio.audioservice:_stop:350 | END Stop
2021-08-04 09:41:27.118 | ERROR    |   730 | concurrent.futures | exception calling callback for <Future at 0xb0f6e590 state=finished raised AttributeError>
Traceback (most recent call last):
  File "/usr/lib/python3.7/concurrent/futures/_base.py", line 324, in _invoke_callbacks
    callback(self)
  File "/home/pi/mycroft-core/.venv/lib/python3.7/site-packages/pyee/_executor.py", line 56, in _callback
    self.emit('error', exc)
  File "/home/pi/mycroft-core/.venv/lib/python3.7/site-packages/pyee/_base.py", line 116, in emit
    self._emit_handle_potential_error(event, args[0] if args else None)
  File "/home/pi/mycroft-core/.venv/lib/python3.7/site-packages/pyee/_base.py", line 86, in _emit_handle_potential_error
    raise error
  File "/usr/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/home/pi/mycroft-core/mycroft/audio/audioservice.py", line 391, in _restore_volume_after_record
    restore_volume()
  File "/home/pi/mycroft-core/mycroft/audio/audioservice.py", line 383, in restore_volume
    self.current.restore_volume()
AttributeError: 'NoneType' object has no attribute 'restore_volume'
2021-08-04 09:41:53.871 | INFO     |   730 | mycroft.audio.speech:mute_and_speak:127 | Speak: Here is this hour's news on ABC News Australia.
2021-08-04 09:41:53.873 | INFO     |   730 | mycroft.tts.tts:_get_sentence_from_cache:392 | Found eab8e3fd5522993e6289713ad564829d.wav in TTS cache
Playing WAVE '/tmp/mycroft/cache/tts/Mimic/eab8e3fd5522993e6289713ad564829d.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Mono
2021-08-04 09:41:57.735 | INFO     |   730 | audioservice_simple:add_list:79 | Track list is [['file:///tmp/mycroft/cache/NewsSkill/stream', 'audio/mpeg']]
2021-08-04 09:41:57.743 | INFO     |   730 | audioservice_simple:play:162 | Call SimpleAudioServicePlay
2021-08-04 09:41:57.761 | INFO     |   730 | audioservice_simple:_play:97 | SimpleAudioService._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

Directory: /tmp/mycroft/cache/NewsSkill/
Playing MPEG stream 1 of 1: stream ...
Note: Illegal Audio-MPEG-Header 0x00000000 at offset 191.
Note: Trying to resync...
Note: Hit end of (available) data during resync.

[0:01] Decoding of stream finished.

Environment (please complete the following information):

  • Device type: Raspberry Pi
  • OS: Picroft
  • Mycroft-core version: 21.2.0
  • Other versions: N/A

I'm using a Jabra 510 and had to modify the play commands during setup based on the troubleshooting guide.

updated skill link not working

Describe the bug

[olzeke51@Linuxer ~]$ ssh -p 8222 [email protected]
(.venv) mycroft@localhost:~$ msm install https://github.com/MycroftAI/skill-npr-news/tree/bugfix/rm-curl
INFO - building SkillEntry objects for all skills
WARNING - No such default skill: mycroft-pandora
WARNING - No such default skill: mycroft-pandora
INFO - Downloading skill: https://github.com/MycroftAI/skill-npr-news/tree/bugfix/rm-curl
INFO - Problem performing action. Restoring skill to previous state...
INFO - invalidating skills cache
CloneException: 
  stderr: 'Cloning into '/tmp/tmpyni1lf4d'...
fatal: repository 'https://github.com/MycroftAI/skill-npr-news/tree/bugfix/rm-curl/' not found
'
(.venv) mycroft@localhost:~$`

```
**To Reproduce**
use msm to install from github

[mycroft-news.tar.gz](https://github.com/MycroftAI/skill-npr-news/files/7050379/mycroft-news.tar.gz)

**Log files**


**Environment (please complete the following information):**
 - Device type: [Mark2-devkit / usb flash / network cable
 - OS: [default
 - Mycroft-core version: . 21.2
 - Other versions: latest 08-19
[edit vv ]
* this was written late aug 25 - if it is in the standard default - 
* noticed new screen display - but no audio for NPR

Assumption that first link of first entry is audio is not true

data['entries'][0]['links'][0]['href'])

This assumes that the first link of a podcast RSS feed is the audio. This may work for the items in the drop down, but is not true of all.

For example,

https://albertmohler.com/category/the-briefing/feed/

That feed does not play because the first link is not the audio.

I suggest that a better heuristic should be employed. If there's only one link, the first is fine. If there's more than one link, then check for rel=enclosure and/or type=audio/mpeg and similar to try and make sure the correct link is picked.

I was going to submit this as a PR, but my Mark 1's SD Card bit the dust again, so I need to deal with that problem before I can attempt a fix.

Cheers.

NPR News Feed broken

NPR News not playing anything when called.

The NPR News Feed pulls from an RSS feed: https://www.npr.org/rss/podcast.php?id=500005

The returned url is of the form: https://play.podtrac.com/npr-500005/edge1.pod.npr.org/anon.npr-mp3/npr/newscasts/2020/08/02/newscast200745.mp3?awCollectionId=500005&awEpisodeId=898418616&orgId=1&d=300&p=500005&story=898418616&t=podcast&e=898418616&size=4500000&ft=pod&f=500005

When downloaded an error page is returned:

Invalid URL
Reason: Bad destination extension: mp3%3fawcollectionid%3d500005%26awepisodeid%3d898418616%26orgid%3d1%26d%3d300%26p%3d500005%26story%3d898418616%26t%3dpodcast%26e%3d898418616%26size%3d4500000%26ft%3dpod%26f%3d500005
The Podtrac Measurement Service only supports redirects to valid podcast media files that appear in a podcast feed registered with Podtrac.

Presumably this is an error on NPR's side and may be resolved in its own time. Can do a short term work around and check in two weeks to see if issue still exists.

Should also add a check on downloads, if a html page is returned then report error, don't try to play it.

Mycroft listens in on the news

After mycroft (Mark-1, production image from 2017/07/30) fetches and plays the news it won't stop listening for the wake word and will either:

  • listen continuously and do nothing
  • listen in and ask for clarification because it did not understand the command
  • listen in and actually do something (for example playing the news, resulting in NPR inception :-D)

At the moment i simply presume that mycroft is overly sensitive if the user changed the wake word.
I am not sure where or how this could be fixed, i just wanted to document this behaviour.

Generic "play the news" intent not working

I've pulled the commit just PRed to the marketplace, and the generic "play the news" utterance does not default to NPR. "Play NPR" works just fine, but, "play the news" throws this:

>> Here is the latest news from Your custom feed.
>> There seems to be a technical issue, I couldn't start that news feed.
2020-01-17 01:36:15.505 | INFO     | 15524 | Playback Control Skill | Resolving Player for: the news
Removing event mycroft-playback-control.mycroftai:PlayQueryTimeout
Removing event mycroft-playback-control.mycroftai:PlayQueryTimeout
2020-01-17 01:36:20.057 | INFO     | 15524 | Playback Control Skill | Playing with: skill-npr-news
2020-01-17 01:36:20.217 | ERROR    | 15524 | NewsSkill | Error: 'NoneType' object is not subscriptable
2020-01-17 01:36:20.219 | INFO     | 15524 | NewsSkill | Traceback: Traceback (most recent call last):
  File "/opt/mycroft/skills/skill-npr-news/__init__.py", line 253, in handle_latest_news
    url = self.get_media_url(rss)
  File "/opt/mycroft/skills/skill-npr-news/__init__.py", line 210, in get_media_url
    if station_url[-4:] in DIRECT_PLAY_FILETYPES:
TypeError: 'NoneType' object is not subscriptable

Non common-play intents don't match longer names of stations

Currently only the short name / acronym of a station will be matched for intents that don't use the Common Play system.

Example tests that would currently fail:

  @xfail
  Scenario Outline: give me the news from channel
    Given an english speaking user
      When the user says "<what is the news on a specific channel>"
      Then mycroft reply should contain "<specified channel>"

   Examples:
     | what is the news on a specific channel | specified channel |
     | what's the news on the financial times | financial times |
     | what's the financial times news | financial times |
     | what is the latest news from associated press | AP Hourly Radio News |

VRT news link is dead

The current VRT news link (Belgian radio) is dead, but the URL below is working:

VRT=FileStation('VRT', 'VRT Nieuws',
                'http://progressive-audio.vrtcdn.be/content/fixed/11_11niws-snip_hi.mp3',

missing license ?

This repo seems to be missing a license - although there are mentioned apache licence in the init.py I think the github repo should have a license aswell.

Desktop version does not stop the news

Using CLI input (github clone debug-mode), after I ask Mycroft to tell me the news, NPR starts, but mycroft does nothing when I type "end news" or "stop news". the whole report finishes.

All I get is the following:

- DEBUG - {"type": "complete_intent_failure", "data": {}, "context": null}
- DEBUG - {"type": "recognizer_loop:utterance", "data": {"lang": "en-us", "utterances": ["end news"]}, "context": null}
- DEBUG - {"type": "skill.converse.request", "data": {"lang": "en-us", "skill_id": 7287314279880443391, "utterances": ["end news"]}, "context": null}
- DEBUG - {"type": "skill.converse.response", "data": {"skill_id": 7287314279880443391, "result": false}, "context": null}
~~~~false, "entities": [{"confidence": 1.0, "data": [["news", "NPRNewsKeyword"]], "key": "news", "match": "news"}], "key": "news", "match": "news"}], "utterance": "end news"}, "context": {"target": null}}
- DEBUG - {"type": "mycroft.skill.handler.start", "data": {"handler": "NPRNewsSkill.handle_stop"}, "context": null}
- DEBUG - {"type": "mycroft.skill.handler.complete", "data": {"handler": "NPRNewsSkill.handle_stop"}, "context": null}

Should /tmp/stream be hardened against people doing tricky things with race conditions?

The path for the socket is hard coded in tmp, I've seen a lot of security announcements that involve trying to avoiding race conditions triggered because of predictable files in /tmp

Maybe it'd be better to use tempfile.mkstemp to make a random file as needed or, since it looks like the file is a socket maybe just use the user's private /run/user/ directory?

"Play the XXX news" does not work as expected

Hi al,
in the examples, and in the code, it seems possible to ask mycroft to play the news from a specific source (my wife is spanish and I am italian, you can imagine).
However, I cannot make mycroft play any news if not from the default one, at least, in italian. I could not even find the intent for that.

Add news feeds for more countries

A generic issue thread for the addition of new feeds or stations, particularly for countries that aren't yet represented. Contributions are warmly welcomed!

A list of the existing feeds can be found here:

FEEDS = {
"other" : ("your custom feed", None),
"custom" : ("your custom feed", None),
"ABC" : ("ABC News Australia", "https://rss.whooshkaa.com/rss/podcast/id/2381"),
"AP" : ("AP Hourly Radio News", "http://www.spreaker.com/show/1401466/episodes/feed"),
"BBC" : ("BBC News", "http://podcasts.files.bbci.co.uk/p02nq0gn.rss"),
"CBC" : ("CBC News", "http://www.cbc.ca/podcasting/includes/hourlynews.xml"),
"DLF" : ("DLF", "https://www.deutschlandfunk.de/podcast-nachrichten.1257.de.podcast.xml"),
"Ekot" : ("Ekot", "https://api.sr.se/api/rss/pod/3795"),
"FOX" : ("Fox News", "http://feeds.foxnewsradio.com/FoxNewsRadio"),
"NPR" : ("NPR News Now", "http://www.npr.org/rss/podcast.php?id=500005"),
"PBS" : ("PBS NewsHour", "https://www.pbs.org/newshour/feeds/rss/podcasts/show"),
"VRT" : ("VRT Nieuws", "https://progressive-audio.lwc.vrtcdn.be/content/fixed/11_11niws-snip_hi.mp3"),
"WDR" : ("WDR", "https://www1.wdr.de/mediathek/audio/wdr-aktuell-news/wdr-aktuell-152.podcast"),
"YLE" : ("YLE", "https://feeds.yle.fi/areena/v1/series/1-1440981.rss")
}

New feeds being proposed must include:

  • Title - eg "AP Hourly Radio News"
  • Shortcode - eg "AP"
  • Feed URL - eg "http://www.spreaker.com/show/1401466/episodes/feed"
    The feed URL may be an RSS feed or a direct audio feed.
  • Alternative names that may be used by a user - eg "Associated Press"
  • Logo - a (preferably square) logo to display on any GUI available.

Add Italian news

It is finally possible to have news from RaiNews, from Italy. It would be nice to implement them.

Todo: support multiple radio

Skill doesn't work or recognize requests.

Just doesn't work.

To Reproduce
"Hey Microft"
Bing
"Play the news"
Just one moment while I look for that, I'm not sure how to play the news.

"Hey Microft"
Bing
"Tell me the news"
How long of a time?
"Cancel"

"Hey MIcroft"
Bing
"Restart News"
Would you like me to restart now
"Confirmed"
Computer restarts

I've uninstalled the skill news, I've reinstalled it. I've gone to https://home.mycroft.ai/skills and to the "Latest News" tab to find version 2 is what's loaded on this machine and no options to change the feed. Version 1 on older machines never had an issue.

Expected behavior
"Hey Microft"
BIng
"play the news"
The current news is ....

Log files
audio.log
bus.log
enclosure.log
skills.log
voice.log

Desktop
Intel Core i7-4770 CPU @3.40GHz x 8
16 Gb Ram
2.3TB SSD
Ubuntu 21.04
Microft Core 21.02.0

Additional context
Add any other context about the problem here.

Please think carefully about whether you have modified anything in Mycroft's code or configuration files. If so, can you reproduce this on a clean installation of Mycroft? Many "bugs" turn out to be non-standard configuration errors.

Mycroft.gui is installed.

url_rss NoneType

Traceback (most recent call last):
  File "/home/mycroft/mycroft-core/mycroft/skills/core.py", line 123, in load_skill
    skill._register_decorated()
  File "/home/mycroft/mycroft-core/mycroft/skills/core.py", line 460, in _register_decorated
    method = getattr(self, attr_name)
  File "/opt/mycroft/skills/skill-npr-news/__init__.py", line 44, in url_rss
    if "not_set" in pre_select:
TypeError: argument of type 'NoneType' is not iterable

common play ignores default feed

if i say "latest news" the selected feed in web settings is used

if i say "play news" common play takes over and plays NPR, expected behavior was to use default feed

Missed Intent

"Tell me the news" is not recognized as an intent for this skill.

Rename skill

Long time has passed since the news came just from NPR.

We can now play news from all over the world, I think it is time to give the skill the new name it deserves :)

Extend default_stations method

Currently default stations are defined on a per country basis. If multiple stations are defined and these are geographically based we could provide the most localized station available for each user.

Eg #96 is a station for the state of Hessen, Germany.
Hence if a user is located in Hessen, they should receive the Hessen station, rather than the national default.
Similarly if there was a Berlin station, that should be the default for users from that city.

As always these can be overridden in settings and other stations can be requested by name.

Need to consider the best way for defining this for each station, and then how to select based on that definition.

Failed to load skill: skill-npr-news

Traceback (most recent call last):
File "/home/carlos/mycroft-core/mycroft/skills/core.py", line 119, in load_skill
('.py', 'rb', imp.PY_SOURCE)
File "/usr/lib/python3.6/imp.py", line 235, in load_module
return load_source(name, filename, file)
File "/usr/lib/python3.6/imp.py", line 172, in load_source
module = _load(spec)
File "", line 684, in _load
File "", line 665, in _load_unlocked
File "", line 678, in exec_module
File "", line 219, in _call_with_frames_removed
File "/opt/mycroft/skills/skill-npr-news/init.py", line 21, in
from mycroft.skills.common_play_skill import CommonPlaySkill, CPSMatchLevel
ModuleNotFoundError: No module named 'mycroft.skills.common_play_skill'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.