Community Event / Creation Galnews feed -> TTS

I wrote a short GO script which parses the official GalNet News page, and outputs headlines or articles in a Text-To-Speech friendly format to stdout. The (slightly outdated now) source can be found at https://github.com/sammyf/galnewsreader or in the archive itself (that would be the newest source file in that case).

Here is how to install the whole thing. A slightly different version is included in the Readme.txt file.

(The following text is from page 7 of this thread, but I couldn't find a way to get a permalink to the original text)
- grab https://dl.dropboxusercontent.com/u/...TextReader.zip
- extract it somewhere (your "Download" directory for example). you Should end up with a VATextReader directory (NOT the archive!)
- copy all the *FILES* into C:\program files (x86)\VoiceAttack\Apps\VATextReader
- In case I misunderstood you : copy the *FILES* contained in the galnewsreader archive into C:\program files (x86)\VoiceAttack\Apps\VATextReader
- Make sure that "Enable Plugin Support" is checked in the Voice Attack options
- restart VoiceAttack
- import the sample profile
- say "headlines"

if everything is okay, you should get the jingle and then Microsoft's TTS engine telling you all the current Galnet Headlines.


have fun and fly safely :)

Latest News: all automatic updates and reports are now completely ignored. They were spamming the headline list and they just don't make much sense in the context of a TTS newscast.

Latest Version:
4.1.9:
Removed most of the redundant blurps to unclutter the stream further. Thanks to Cmdr Mossfoot for the excellent suggestion.
4.1.8:
Automatic reports and updates will now be ignored completely.
4.1.7:
Removed the weekly news as it isn't published by Frontier anymore
Automatic skipping of Conflict and Expansion Reports. Thanks to EDDI for the inspiration.
4.1.6:
fix for the new weekly newsletter URL.
the Community Goal section has been added to the weekly news.
4.1.5:
fix for the weekly galnet focus (Frontier modified the anchor)
4.1.4:
fix for the modified Galnet format
4.1.3:
fix:
* removed the title repetition at the start of the news
* parsing html entities and removing html tags from titles
4.1.2
fix: new Galnet news URL and formatting
4.1.1
fix: months days 1 to 9 are now correctly returned as 1st...9th instead of 01st ... 09th.
4.1.0
fix:
* new Galnet News URL
* Frontier changed the layout again.
* 11th, 12th and 13th instead of 11st, 12nd and 13rd
* couple of typos in the fluff

Download (incl. VA sample profile) available at https://www.cosmic-bandito.com/galnewsreader_4.1.9.7z (md5: 02be8f65dd50a97ac773d1e6224b2019, ~2MB big. This is my private server, so please don't abuse it!).

I also put some example command lines in the README.TXT, updated the sample voice attack profile to include the new command and show how to use a jingle file.
The file jingle.wav was created and is copyrighted to the freesound user "jobro" and can be found at http://freesound.org/people/jobro/sounds/173147/
It is licensed under the Attribution Noncommercial License.

Here is a short clip of v. 3.02 "in action"
[video=youtube;h0DRM1wDhv0]http://www.youtube.com/watch?v=h0DRM1wDhv0[/video]

the following is not true anymore, and is therefore hidden
I wrote a command in voice attack to call "powershell.exe -WindowStyle Hidden ./galnewsreader.exe -item=0 |%{ ./say.ps1 $_}" and had Ivona's Emma read me today's headline.
It all works very well, except for MS Windows' inability to 1) come bundled with a "say.exe" command and 2) start a script without opening a window for half a second and throwing me out of Elite ... so yeah ... as it is it's not useable unless you play windowed ... but I thought I'd share it with you, in case someone can overcome Window's .... aehm ... 'peculiarities' .
 
Last edited:
The issues have been fixed and a working .exe can be found at http://cosmic-bandito.com/elite/galnewsreader.7z.

This works nicely with VoiceAttack and Luca D's "Text And XML" plugin https://groups.google.com/forum/#!topic/voiceattack/VotudmB84hE. A sample voice attack plugin and the source for galnewsreader are included in the archive.
Pro tip : in my own setup I also have Voice Attack plays a short News Jingle before starting to speak (namely this one : http://freesound.org/people/Thejack288/sounds/156060/, but freesound has some nice choice of different jingles :)

I'm currently hosting the file myself (using another of D.Braben's pet projects ... go figure out which one:p, so I don't know how many simultaneous request my server can handle. Tell me if the download is excruciatingly slow and I'll find another home for it.
 
This is genius. Wish Frontier had done what you've done. I'll try it as soon as I can.

Could you put a how to video or a sample together. I have no idea what git hub is or any such stuff but I want glanet news as audio... rather badly.
 
Ben, you don't need to go to github as the binary is in the 7z Archive. Github is a source repository for open source software, but if you are not a developer you are probably not going to install a GO compiler and build the application yourself :)

The tool was written to be used in conjunction with Voice Attack. If you have VA, you need to enable plugins in VA, grab the "XML and TEXT" plugin ( the discussion with the link to the plugin is at https://groups.google.com/forum/#!topic/voiceattack/VotudmB84hE ). Now extract the plugin into the Apps directory of Voice Attack, which is generally located in C:\Program Files (x86)\VoiceAttack\ .
Make sure that the plugin is in its own directory (which means you have something like that C:\Program Files (x86)\VoiceAttack\Apps\VATextReader ). Next restart Voice Attack, and import the sample command that was in galnewsreader.7z .
Two text variables are set at the beginning of the command :

VAReaderFile should contain the path to galnewsreader.exe
You can put galnewsreader.exe in the VATextReader directory and try the sample command directly or you can put it somewhere else but then you need to modify the first line of the command so that the path is correct.

VAReaderArgs contains the argument that is passed to my tool. -item=0 means "get the headlines". "-item=1" means get headline 1, etc ... At the moment the tool only retrieve the summary by the way, but I (or someone else) can change that easily.


If you don't use Voice Attack you will have to find a command that sends text to Window's TTS engine. I *DO* have a small script on github called say.ps1 which does that, but my guess is that it won't work very well in conjunction with a full screen game, as Powershell keeps taking the focus away and drops to the desktop :/

I just downloaded FRAPS (which I actually bought sometime in the late 90s, but I don't have the email address anymore nor the serial ...gahh), and I'll try to make a clip showcasing this thing :)
 
I think I can manage that ... er maybe...

I'll give it a go on the weekend or I'll be up all night faffing around.

Thanks :D
 
oh great. Apparently between the 29th and today someone decided to put a link in the galnews titles for each headline so my script misfires and doesn't extract the date correctly anymore or maybe I never noticed that the date was wrong for single articles ... weird both ways ... anyway update incoming ...
 
Last edited:
New version is out, with a corrected output, readable README.TXT, and two versions of the tool :

galnewsreader.exe is for Voice Attack's plugin, as it doesn't print anything out
galnewsreader_stdout.exe prints everything out, for those who want to use it with something else than VA.

The link is still the same.

Enjoy
 
Here are two short clips (I'm still waiting for the FRAPS License I bought 30mn ago, so no way to make anything longer than 30secs :/

[video=youtube;T755a2LD9gA]https://www.youtube.com/watch?v=T755a2LD9gA[/video]
[video=youtube;5DrURMGScaA]https://www.youtube.com/watch?v=5DrURMGScaA[/video]


Enjoy :)
 
I really like the look of this and will try and get it installed, it does look a little complicated but will give it a go - thanks for sharing it. Do you get the latest Galnet news ready to play before you dock?
 
New version is up. It has a couple of new features :

* calling galnewsreader with the option -item=0 returns the (numbered) headlines, -item=[some number] returns the summary for the article with that number in the headlines, -item=-[some number] returns the full content for the headline with that (positive) number in the headlines

* a file called "galnews.txt" containing the last ouput is writen in the work-directory of the program

* there is a relatively extensive VoiceAttack template included. Drawback it contains german commands. "Nachricht" means "message" or "news" and is a prefix for the numbers, "Zehn" means "10", "Aufhören" means "stop it", "Schlagzeilen" means "Headlines", "ganzer text" means "full text". Basically, you are supposed to call the "headlines", then say "Message 1" (or whichever), which will bring you the summary. You can then issue a "full text" command to get the full text of the last summary you listened to (can be done beofre the summary is finished, as any new Text2Speech call will ovveride any that is currently running). It should be possible to write a "Next" and "Previous" command, but I didn't :p

I also fixed the numbering not working correctly, html entities in the text are now correctly decoded, some weird Frontier specific spelling ("TransmisSion") and character combinations :):) are fixed or removed, and "cmdr" is now inflated to "Commander".

Here is a 6 minute clip of me hunting some wanted criminal scum in a planerary ring while calling up and listening to the news (And losing the connection to the server just as I was going to make some much needed money :/

[video=youtube_share;_O30g1PbAFM]http://youtu.be/_O30g1PbAFM[/video]
 
Last edited:

wolverine2710

Tutorial & Guide Writer
Nice tool. Listened to your video. Speech is much better then I had thought.

I've added it to my "Complete list of all third party tools, spreadsheets, manuals and other data sources" thread.

Name: galnewsreader
Author: Dweezil Moon
Description: tool to reformat the official Frontiers' Galnet News page to something Text2Speech friendly. Intended for VoiceAttack users but can probably be used by other tools
Source available: Yes. Open source license: GPL v3. GitHub repository
Thread: [AUDIO] Galnews feed -> TTS
Compatible with Gamma: yes
Comments: 20141210: the Galnet page hasn't been updated in a couple of weeks now, so I don't know how useful this tool will be. My hope is that the news start again on the 16th.
 
Last edited:
i got this all working but only with shortcuts like shift+F8 will it just play randomly for me ??..Also after a couple of runs it just says end of stream no headlines
 
Last edited:
i got this all working but only with shortcuts like shift+F8 will it just play randomly for me ??..Also after a couple of runs it just says end of stream no headlines

you can use shortcuts instead of voice commands just fine. The program doesn't care how it has been invoked, just what item is being requested. -item=0 as parameter returns the headlines, -item=1 returns the summary for headline 1, -item=2 returns the summary for headline 2, etc ... -item=-1 returns the full transcript for headline 1, -item=-2 returns the full transcript of headline 2 etc ...
the full summary is returned twice by the way, with the second iteration prefixed with "repeating ...". This is just because I noticed that I missed bits of the news because I was concentrating on flying or whatever and was always requesting the same item twice just to hear what I had missed.
If you send it to the TTS via Voice Attack you just need to let voiceattack say *anything* to stop the news (in the sample profile there should be a command which is really just say "" and which does exactly that.

I'm not sure if I understand your next question. After getting the headlines a couple of times you don't get them anymore?
 
Thats the issue precisely however it seems to have worked itself out also dont know if ur aware but the profile isnt in english so hard to tell which command does what to rename them
 
Last edited:
Back
Top Bottom