[Plugin release] Text and XML reader

2,884 views
Skip to first unread message

Luca D

unread,
Aug 27, 2014, 3:44:24 AM8/27/14
to voice...@googlegroups.com
Hello,
I went back to my old code from VABuddy and created a proper plugin, taking advantage of the latest functions introduced in VoiceAttack (requires beta v1.5.5.6 or above)
You can find it here: https://dl.dropboxusercontent.com/u/90846278/VATextReader.zip

The plugin adds commands for extracting content from plain text or XML files, locally or over the Internet, and push it back to VoiceAttack for Text-to-Speech or any other use. It also features a text viewer/editor window that can be used a a sort of notepad/memo/sticky note for your games.
There's also some additional settings already in place (namely caching options for remote files), for when the 'Info' plugin function will be made available in VoiceAttack

Please follow the instructions in the 'readme.txt' file and the included help file and sample profile.

The source code will be available shortly, after some more testing and clean-up

Have fun and let me know of any problem,
Luca

Trevor Woodcook

unread,
Aug 27, 2014, 7:48:26 AM8/27/14
to voice...@googlegroups.com
I will check this out when I get home from work tonight!


--

---
You received this message because you are subscribed to the Google Groups "VoiceAttack" group.
To unsubscribe from this group and stop receiving emails from it, send an email to voiceattack...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Trevor Woodcook

unread,
Aug 27, 2014, 8:46:02 PM8/27/14
to voice...@googlegroups.com
Works like a charm! 


On Wed, Aug 27, 2014 at 3:44 AM, 'Luca D' via VoiceAttack <voice...@googlegroups.com> wrote:

--

r.gal...@gmail.com

unread,
Aug 28, 2014, 4:15:49 PM8/28/14
to voice...@googlegroups.com
thanks for updating very handy plug in
Message has been deleted

Robert Scott

unread,
Sep 11, 2014, 8:18:43 PM9/11/14
to voice...@googlegroups.com


On Wednesday, August 27, 2014 12:44:24 AM UTC-7, Luca D wrote:
 This looks great, unfortunately I can't seem to get it to work. I'm using beta 1.5.5.9 and I'm getting an error in VA "UNABLE TO ACCESS PLUGIN-PLUGIN NOT AVAILABLE". I followed the directions in the readme so I'm not sure what is going wrong. This plugin was exactly what I was looking for so any help would be very appreciated.

Robert Scott

unread,
Sep 11, 2014, 8:27:36 PM9/11/14
to voice...@googlegroups.com


On Wednesday, August 27, 2014 12:44:24 AM UTC-7, Luca D wrote:

Derp, I just enabled plugin support. Read the manual? What do you mean read the manual? Plugin works great, thanks.

Luca D

unread,
Sep 12, 2014, 3:21:16 PM9/12/14
to voice...@googlegroups.com
I'm glad it works fine... a small update is coming soon with some more options

There's some explanation worth reading in the help file included, especially in regards to the parsing of XML files

Trevor Woodcook

unread,
Sep 14, 2014, 8:43:25 AM9/14/14
to voice...@googlegroups.com
Will you be adding a donate button/option anytime soon? :P

--

Luca D

unread,
Sep 14, 2014, 11:16:58 AM9/14/14
to voice...@googlegroups.com
A new version is available at the usual address:
https://dl.dropboxusercontent.com/u/90846278/VATextReader.zip

This release introduces the use of optional Regular Expressions while parsing a text file, to return only a specified portion of the file instead of the whole content.

Please follow the instructions in the 'readme.txt' file, the sample profile and the included help file in RTF format.

Have fun,
Luca

Luca D

unread,
Sep 14, 2014, 11:17:41 AM9/14/14
to voice...@googlegroups.com
Not for now, but in the meantime enjoy the new version just released ;-)

Kevin Taylor

unread,
Sep 14, 2014, 11:45:42 AM9/14/14
to voice...@googlegroups.com
Hi, 

Has anything changed on the reading of web urls. As I can't seem to to get it read the urls anymore?

Thanks

Luca D

unread,
Sep 14, 2014, 1:42:50 PM9/14/14
to voice...@googlegroups.com
My bad... little bug with the new RegEx functions; try downloading again, should be fixed now

Kevin Taylor

unread,
Sep 14, 2014, 1:48:14 PM9/14/14
to voice...@googlegroups.com
Hi, Tried again with a new download.

Getting this error, with both web and local text files:
18:46:55 - Error loading file content "test.txt".

If I downgrade to 1.01, all works fine.

Thanks

Kevin

On Wednesday, 27 August 2014 08:44:24 UTC+1, Luca D wrote:

Luca D

unread,
Sep 14, 2014, 2:04:23 PM9/14/14
to voice...@googlegroups.com
That's strange, i checked every function again, both local and remote file, text and xml and here it works as it should

It might be a cache problem with DropBox... could you please try a download again in a few minutes? when Voice Attack starts, you should read "Plugin 'VA Text Reader 1.02b' initialized" (note the "b"... if it's there, then it's the latest, rechecked version)

Kevin Taylor

unread,
Sep 14, 2014, 2:10:19 PM9/14/14
to voice...@googlegroups.com
Hi, Thanks, downloaded again and it's now 1.02b all working fine.

Thanks

Kevin

On Wednesday, 27 August 2014 08:44:24 UTC+1, Luca D wrote:

Nevar

unread,
Oct 14, 2014, 11:11:59 AM10/14/14
to voice...@googlegroups.com
Hi guys, 

Thanks for this, it looks pretty good.
However, in a text file, letters with accent (so french) are not read (like muted letters).
Is it something that can be fixe somehow ? 

Thanks for your help.

Nevar

unread,
Oct 16, 2014, 6:56:20 AM10/16/14
to voice...@googlegroups.com
Hello again,

just to know, do you thing this is going to be possible ? 

Regards,

Luca D

unread,
Oct 16, 2014, 8:44:10 AM10/16/14
to voice...@googlegroups.com
I have to double-check this; i'm running on an English Windows so my text-to-speech engine is English only.... could you attach a sample file so i can reproduce the problem?

Nevar

unread,
Oct 16, 2014, 9:39:15 AM10/16/14
to voice...@googlegroups.com
Hi,

It is going to be difficult to "show you" the issue, even with a french sentence, you  could not say if the prononciation is correct or not.
However, if I try to open the little text windows of what is read, then you can see that all accent letter are replace by this �.
When reading, the TTS just doesn't prononce the letter.

What is originaly : "Tête, frère, été"
Appears : "T�te, fr�re, �t�"
And sounds : "t'te, fr, t"
(it works perfectly if directly use in VA, problem appears only with text files)

If you want to have a french voice, it could be easy on windows 8, not so much on seven (needs a trick in the registry).
Usualy I have these kind of � symbole when opening a non UTF8 web page with french or accented letters.

Let me know if I can help somehow, and if you need a "sample", what do you want ?

Thanks again for your help.

Luca D

unread,
Oct 16, 2014, 10:52:50 AM10/16/14
to voice...@googlegroups.com
The file encoding was exactly what i was thinking... is the text file ASCII or Unicode?

Nevar

unread,
Oct 16, 2014, 11:56:39 AM10/16/14
to voice...@googlegroups.com
The text.txt file was coded with ANSI.
I didn't knew  I could change the code of a "txt" file... 
Tested in UTF8 with sucess => problem solve !

Thanks a lot for your help :)

Luca D

unread,
Nov 29, 2014, 3:33:15 AM11/29/14
to voice...@googlegroups.com
A new version is available at the usual address:
https://dl.dropboxusercontent.com/u/90846278/VATextReader.zip

This release adds a simple string comparison function between any two variables, so that you can create a condition block in VA based on text variables instead of being limited to numeric condition.

Sammy Fischer

unread,
Dec 1, 2014, 4:28:09 PM12/1/14
to voice...@googlegroups.com
Would it be possible to just extract the stdout from a local external command too?

Luca D

unread,
Dec 2, 2014, 3:44:07 AM12/2/14
to voice...@googlegroups.com
If the process can be started by the plugin itself, the yes (not with the existing plugin code, but it can be done pretty easily)
If the process is already running or need to be started by hand/another tool, then i don't think so...

Sammy Fischer

unread,
Dec 2, 2014, 8:32:23 AM12/2/14
to voice...@googlegroups.com
yeah. In my use-case, the tool is standalone. It's just an exe file produced with the go compiler which scrapes a non-rss page (Elite:Dangerous "GalNews") and reformats it in a Text2Speech friendly format, then outputs the reformated string to stdout. I've been struggling to find a generic "say" command line tool for windows, but as the scraper is supposed to be started via voiceattack anyway going through your VA-plugin and then using VA's 'say something' command would make much more sense.

Luca D

unread,
Dec 2, 2014, 8:56:59 AM12/2/14
to voice...@googlegroups.com
If you have the source code for that, maybe it might be more practical to convert straight to a plugin of it's own (i'm not too familiar with Go, but it should not be too hard to port it to C#), instead of doing "multiple jumps" back and forth between my plugin, your tool and VA

However i can certainly have a look at that later at home, shoudn't be too hard...

Sammy Fischer

unread,
Dec 2, 2014, 9:44:28 AM12/2/14
to voice...@googlegroups.com
I'm not particularly familiar with C# myself, as I generally develop for Linux.  The scraper itself isn't complicated at all, really just a couple of std lib calls and regexps (the source is at https://github.com/sammyf/galnewsreader if anybody is interested), and I guess it is my linux "roots" that makes me chain-pipe tools after tools to achieve something, but maybe I should check C# and VA plugins anyway :)

Luca D

unread,
Dec 2, 2014, 4:49:18 PM12/2/14
to voice...@googlegroups.com
Ok, should be done... I actually spent more time reworking the whole Help file than adding the feature ;-)

Get it from the usual link here https://dl.dropboxusercontent.com/u/90846278/VATextReader.zip

Sample and help included, let me know if this works OK

Sammy Fischer

unread,
Dec 3, 2014, 8:45:54 AM12/3/14
to voice...@googlegroups.com
Sweet! Tahnks a lot. I'll try it out as soon as I get back from work :)

Sammy Fischer

unread,
Dec 3, 2014, 1:30:19 PM12/3/14
to voice...@googlegroups.com
Works wonderfully!
I also found out that I needed to add two flags ( -ldflags -H=windowsgui ) while compiling the go code, but now the integration with voice attack is perfect.

Thank you again! :)

Marc Thompson

unread,
Dec 27, 2014, 4:23:45 AM12/27/14
to voice...@googlegroups.com
Hi.

I've been using your plugin for some time now... great work... just as a question would this be compatible to querying JSON strings?

Luca D

unread,
Dec 27, 2014, 10:31:03 AM12/27/14
to voice...@googlegroups.com
Not directly, at the moment... however you can achieve some level of compatibility by using regular expressions, if the string is not too complex; for example you can query a specific property of a simple JSON object by using a regular expression like:

"property name": (.+)

It's not too hard to read a proper JSON object into .NET, the problem comes from having the plugin parameters be generic enough to be able to read values from any possible class structure... i might have a look at that; you have any specific JSON source in mind, so i can aim at something in particular?

Brad Johansen

unread,
Jan 18, 2015, 12:20:15 AM1/18/15
to voice...@googlegroups.com
Great Plugin, I easily added a RSS feed using your examples. Is there a way to reverse the order in which it reads the data starting with the bottom first. Seems the latest news is appended to the bottom of the page and I would like to start from the latest and work up. Thanks.

Luca D

unread,
Jan 18, 2015, 4:36:09 AM1/18/15
to voice...@googlegroups.com
Version 1.06 is available at the usual address:
https://dl.dropboxusercontent.com/u/90846278/VATextReader.zip

This release introduces a new, more specialized function, for parsing RSS feeds (the previous function, read_xml, is still available for generic XML reading); every stream is now ordered by "published date" upon loading, with newest items on top, and you are able to fetch different element of a single item (title only, summary only, or both together)

There are some quirks and exceptions to consider, depending what specific RSS source you are using (Elite Dangerous Galnet is a prime example) so PLEASE follow the instructions in the included help file, and look closely at the sample profile.

Have fun,
Luca

Luca D

unread,
Jan 18, 2015, 4:37:31 AM1/18/15
to voice...@googlegroups.com
You got lucky :-)
A user asked for that very same thing a few days ago and I just uploaded the new version a few seconds ago.. see the new message above
Message has been deleted
Message has been deleted

Jonathan Swanson

unread,
Jan 22, 2015, 3:48:51 AM1/22/15
to voice...@googlegroups.com
Can you make a vid tutorial, please? I can't make sense of you guide.

Luca D

unread,
Jan 22, 2015, 5:29:17 AM1/22/15
to voice...@googlegroups.com
I might, but at the moment I don't have the software tools (and the time)

For every function described in the RTF help file there's a corresponding sample command in the test profile included with the plugin, so it's usually just a matter of having both the guide and the VA profile editor open, to figure out how things work.

In the meantime, if you have any specific question, feel free to ask here.

Christopher Dick

unread,
Jan 22, 2015, 10:02:40 AM1/22/15
to voice...@googlegroups.com
On Wednesday, August 27, 2014 at 2:44:24 AM UTC-5, Luca D wrote:
Hello,
I went back to my old code from VABuddy and created a proper plugin, taking advantage of the latest functions introduced in VoiceAttack (requires beta v1.5.5.6 or above)
You can find it here: https://dl.dropboxusercontent.com/u/90846278/VATextReader.zip

The plugin adds commands for extracting content from plain text or XML files, locally or over the Internet, and push it back to VoiceAttack for Text-to-Speech or any other use. It also features a text viewer/editor window that can be used a a sort of notepad/memo/sticky note for your games.
There's also some additional settings already in place (namely caching options for remote files), for when the 'Info' plugin function will be made available in VoiceAttack

Please follow the instructions in the 'readme.txt' file and the included help file and sample profile.

The source code will be available shortly, after some more testing and clean-up

Have fun and let me know of any problem,
Luca

I loaded up the latest version of the plugin - with the RSS feed reader - and I'm really looking forward to the opportunities the regexp in particular will provide.  However, there is one part that isn't clear.  Is there a way for me to perhaps set a value so that if there is no new news, an appropriate response is given?  Basically, to have VA "know" if it has already read a particular RSS entry?  Or just read the five latest since the last query?

Luca D

unread,
Jan 22, 2015, 11:42:31 AM1/22/15
to voice...@googlegroups.com
Partially... after the first query, you can store the news content in a text variable and then, on subsequent calls, use the text compare function (available in that same plugin) to check if the text retrieved is the same of the previous query and act accordingly.

Luca D

unread,
Jan 24, 2015, 9:55:58 AM1/24/15
to voice...@googlegroups.com
Version 1.07 is available at the usual address:
https://dl.dropboxusercontent.com/u/90846278/VATextReader.zip

This release adds support for permanent storage and retrieval of text variables and conditions, so that they can be persisted between sessions.

Just pass any desired variable, and they will be stored on disk (in a simple XML file in the plugin directory); call the load function in a subsequent session, using the exact same variable names used before, and they will be loaded back from disk into memory

Needless to say, just read the help file included and look at the sample profile for any detail

Have fun,
Luca

Christopher Dick

unread,
Jan 24, 2015, 6:24:20 PM1/24/15
to voice...@googlegroups.com
Is this still specific to the beta version?  I have the latest VA 1.5.7 and I get the "unable to invoke..." message.

Luca D

unread,
Jan 24, 2015, 6:30:00 PM1/24/15
to voice...@googlegroups.com
No, i'm testing this with the normal release, 1.5.7 indeed.

What's the exact error message that you get? which command (from the sample profile) are you trying to run?

Christopher Dick

unread,
Jan 24, 2015, 7:53:51 PM1/24/15
to voice...@googlegroups.com
6:52:12 PM - UNABLE TO INVOKE PLUGIN. PLUGIN NOT VALID FOR THIS VERSION OF VOICEATTACK.

I figured it was still needing beta something.  And I'm trying to get it to read back the GalNet news.  I pretty much just exported the command from the sample and imported it into my E:D profile, and changed the actual spoken command to invoke it.

Sutex Osofar

unread,
Jan 24, 2015, 7:56:14 PM1/24/15
to voice...@googlegroups.com


I reading the help , ,need HELP , in setting up the RSS feed , I take it I create my own XML ? lost here
Message has been deleted

Luca D

unread,
Jan 25, 2015, 2:31:42 AM1/25/15
to voice...@googlegroups.com

That happens when the plugin crash for some reasons.

Note that,at the moment, the Galnet news RSS has something wrong going on since the last update... there are plenty of invalid characters in the feed text that are causing also the normal browsers to have problems

This is an actual snippet from the latest feed:
"�It�s out of control! These pirates won�t let an honest miner do a day�s job without gettin� shot at. The Alliance aren�t interested in doing anything about them! We need more independent pilots to come help clean up this mess.�"
note all the messed up chars...

In my test, I'm getting now "Error reading XML: Invalid character in the given encoding. Line 1, position 784.", but even if I simply paste the feed URL (http://www.elitedangerous.com/news/galnet/rss) in Firefox or IE, they are not reading it at all, which normally they do; also, it seems i'm not the only one having a problem here... see also this thread https://forums.frontier.co.uk/showthread.php?t=67293&page=3&highlight=galnet+rss from a user that has is own Galnet reader (combined with my plugin, but used in a different way)

Not sure if I can do much here... all the other (proper) RSS feeds i'm testing, they all work correctly; the generic XML function in the plugin should still work with that feed, because it's approaching the text reading stufff in a different way, but the dedicated classes i'm using for the RSS only stuff, need properly formatted feeds

This is a matter that should be forwarded to FD, hoping they can clean up their feed data to keep it readable by standard tools, not only by their dedicated page...

Christopher Dick

unread,
Jan 28, 2015, 11:54:30 AM1/28/15
to voice...@googlegroups.com
Is there a way to figure out what is making it crash?

Christopher Dick

unread,
Jan 28, 2015, 11:54:30 AM1/28/15
to voice...@googlegroups.com

Luca D

unread,
Jan 28, 2015, 12:57:35 PM1/28/15
to voice...@googlegroups.com
You can try attaching you profile here and tell me the exact sequence of commands that causes the crash... I'm gonna try and replicate the same error on my machine

Sutex Osofar

unread,
Jan 28, 2015, 5:20:25 PM1/28/15
to voice...@googlegroups.com


On Wednesday, August 27, 2014 at 5:14:24 PM UTC+9:30, Luca D wrote:
Hello,
I went back to my old code from VABuddy and created a proper plugin, taking advantage of the latest functions introduced in VoiceAttack (requires beta v1.5.5.6 or above)
You can find it here: https://dl.dropboxusercontent.com/u/90846278/VATextReader.zip

The plugin adds commands for extracting content from plain text or XML files, locally or over the Internet, and push it back to VoiceAttack for Text-to-Speech or any other use. It also features a text viewer/editor window that can be used a a sort of notepad/memo/sticky note for your games.
There's also some additional settings already in place (namely caching options for remote files), for when the 'Info' plugin function will be made available in VoiceAttack

Please follow the instructions in the 'readme.txt' file and the included help file and sample profile.

The source code will be available shortly, after some more testing and clean-up

Have fun and let me know of any problem,
Luca

The reader is only reading the date , its not reading anything eles

Brian McKnight

unread,
Jan 29, 2015, 12:28:08 AM1/29/15
to voice...@googlegroups.com
Luca,
   This plugin is outstanding! You may have already thought of this but I'll put it give you the short version 

if you make use of the "Execute a command each time a phrase is unrecognized" with a Dictation command that check to see if a CONDITION was previously set MSGMODE=1 for example 
then you set a {TXT:msg = {CMD}  you can essentially dictate some text that can be read back with a Read Message 1 command

You plugin let me store them in the storage.xml  to load later too...AWESOME!

now my humble request

How hard would the following things be?

1) Allow the Editor window from SHOW FILE to be opened with the contents of a {TXT:varname}

2)Make editor voice enabled.  Since you can switch a profile as part of a command a special set of voice command could be loaded. 

I want to be able say things like
delete 5th word 
Move to 5th word
Insert before "some new text I want in the file"

Thanks

Luca D

unread,
Jan 29, 2015, 1:49:24 AM1/29/15
to voice...@googlegroups.com
Sorry, but this is a bit vague... "reading the date" of which file?  during the execution of which command?

Once again, note that if you are talking about the Galnet News RSS, then there are some known issue with the format of that particular feed, as described here:
https://groups.google.com/d/msg/voiceattack/VotudmB84hE/IPClhGND7eAJ

Luca D

unread,
Jan 29, 2015, 2:50:24 AM1/29/15
to voice...@googlegroups.com
Il giorno giovedì 29 gennaio 2015 06:28:08 UTC+1, Brian McKnight ha scritto:
[...]]
 
How hard would the following things be?

1) Allow the Editor window from SHOW FILE to be opened with the contents of a {TXT:varname

You mean show the content of an already existing text variable, instead of always expecting a file name to open?
Sure, consider it done
 
2)Make editor voice enabled.  Since you can switch a profile as part of a command a special set of voice command could be loaded. 

I want to be able say things like
delete 5th word 
Move to 5th word
Insert before "some new text I want in the file"

 That's a whole different ballpark... if you mean making the window natively voice enabled, that would be pretty complicated stuff, basically rewriting part of VA itself into the plugin.
On the other end, making the edit window shortcut enabled, so that it can respond to some keyboard combination to be issued manually or via VA itself, that is more doable... there is still some non-trivial stuff, like "move to the Nth word" and the fact that i'm not sure how VA behaves in a situation like this (basically you are in the middle of a pending plugin call, the the one that opened the window itself, and you'll need to handle another "Execute a command each time a phrase is unrecognized" command for your "insert text" that has to feed the data to the same plugin... hmmmm)

I'll take a look into it, can't promise anything though

Christopher Dick

unread,
Jan 30, 2015, 5:42:06 PM1/30/15
to voice...@googlegroups.com
I've attached my profile, and like I said, its a straight import of your "read first galnet" from the sample profile.  I just immediately get that error regarding the plugin not valid for this version of VA.

Thanks!
TTS Elite-Profile.vap

Luca D

unread,
Jan 30, 2015, 6:40:38 PM1/30/15
to voice...@googlegroups.com
Whern you say "immediately" you mean on load? without even executing a single command?

Thats' strange... i tried importing your profile, VA 1.5.7 here, and unfortunately it does not trigger the "not valid" error, so i can't pinpoint what is wrong on your machine.
If you use my sample profile, the one that comes with the plugin, and try all the other functions except the one related to Galnet, do they work or you still get the "non valid" error even when trying "read_text", or "read_xml" and such?

As for the Galnet function specifically, your profile behaves like mine, and it reports the expected "Error reading XML: Invalid character in the given encoding. Line 2, position 1." ...
Like i've said, the ED feed is still semi-broken and is full of messy chars, many are having troubles trying to read that as a standard RSS; you might want to revert back to using the "read_xml" function of my plugin, which aside for the fact that does not sort the items by date (the newest one is on the bottom of the XML, not on top) it should be able at least to fetch

Another GalNet dedicated tool, that still use my plugin but parses the RSS in a different way, is here https://forums.frontier.co.uk/showthread.php?t=67293, might be worth a try

Christopher Dick

unread,
Feb 5, 2015, 9:53:34 AM2/5/15
to voice...@googlegroups.com


On Friday, January 30, 2015 at 5:40:38 PM UTC-6, Luca D wrote:
Whern you say "immediately" you mean on load? without even executing a single command?


Yes, there's a bit a bit of a pause, and then I get the INVALID error in the log.  As far as I can tell, nothing actually executes.

Sutex Osofar

unread,
Feb 6, 2015, 6:36:32 PM2/6/15
to voice...@googlegroups.com
The headlines inside of ED when playing only the date is read , nothing else , The help files , are vague as well , if your new to setting up these files
I had a version before drop in in loaded the profiles , it read the headlines , now it doesn't

Sutex Osofar

unread,
Feb 6, 2015, 6:47:16 PM2/6/15
to voice...@googlegroups.com
SAME HERE  , It has been asked before yet still no  help forthcoming  to explain how to get any of this working , for those who don't know how to hack xml files or RSS feeds , or whatever it is I have to do

Gary

unread,
Feb 6, 2015, 7:21:48 PM2/6/15
to voice...@googlegroups.com
This is actually a plugin that is provided by a trusted, hard-working member of this forum.  If you find it not to your satisfaction, you might want to resolve to investing some of your own personal time creating one that does what you are wanting and is documented to your liking.  Does this make sense?

Gary

Luca D

unread,
Feb 7, 2015, 12:36:24 PM2/7/15
to voice...@googlegroups.com
Believe it or not, I spend more time trying to write a meaningful help file than actually doing stuff in the plugin... by it's nature, using a plugin in VA is a way to do stuff in the "hack" way, there's really no way to make the samples more readable than they are (or at least i can't find a more simple way); it's a matter of reading the help file and comparing what's there with the action list of one of my samples, one command at the time, and you should be able to figure it out.
If not, i'm happy to provide more direction to specific questions ("need HELP" or "is not reading anything else" without context is not a specific question, i'm afraid... don't know where to start helping with those)

Note that while you don't have to directly hack with XML files or RSS feeds by yourself, you still need to have at least a basic understanding of how these type of files are structured, to figure out what the plugin code is trying to accomplish, and why some of the parameters are set the way they are set

I'm actually doing a whole refactoring of both of my plugins into a single, with some new features and the full source code on GitHub... hopefully, also a better documentation.

BTSpaniel

unread,
Feb 9, 2015, 2:31:44 AM2/9/15
to voice...@googlegroups.com
Can you make a plugin or modify one that can give VoiceAttack extra functionality?

VAReader is nice but it can't really do much. I made a good array with it and it works but it can only really output (say) the words. That is pretty pointless.

My Array uses the read xml and uses VAReaderXMLCount as a Random number to select the text i need but i can't do anything with it. Creating or modifying one of your plugins could change this.

Examples of what i want:

I want to be able to take the text from VAReader "{TXT:VAReaderResult}" and replace it in the xml or txt with a Different Result. Like a Read & Write so i can overwrite my VoiceAttack profiles on the spot with new commands with the same name.

Have it Forward every character read from "{TXT:VAReaderResult}" as a key press. Example: {TXT:VAReaderResult} read a xml with the result of "(A)(Space)(A)(Tab)(Mouse.90X)(Mouse.30Y)(PAR.000.010)(W.G.D.X)", it could forward each key to voice attack as a key press and release at 0.010 second for Windows game (DirectX)

Copy to clipboard the text inside the result.

Tobias Frost

unread,
Apr 10, 2015, 4:21:49 AM4/10/15
to voice...@googlegroups.com
Hello,

I'm not sure I am in the right place but I stumbled across your plugin during my searching and thought I'd ask.

I want text to speech to greet viewers when they join my channel on Twitch.  It seems like this plugin could do it, reading from a log file made by an IRC program set to only log joins, but I think I foresee some problems.  I want it to do it automatically without prompting from me, so it would have to do it on a timer and clear the log after each reading, or be able to monitor the log file for changes and read the new entries.  

This might be better handled by an IRC bot that can output to the Windows text to speech engine.  I'm not a programmer unfortunately, but I know it's possible.  I'm just at a loss as to where to start.

I'd appreciate it if you could point me in the right direction.

Thanks.

Luca D

unread,
Apr 10, 2015, 4:55:09 AM4/10/15
to voice...@googlegroups.com
Well, if you want to do that without any prompt from you, that is not even a voice activated command with VA, you probably can skip the whole plugin altogether and simply code that straight into your IRC bot... adding text-to-speech output, in a .NET language, is as simple as adding

using (System.Speech.Synthesis.SpeechSynthesizer synth =
   
new System.Speech.Synthesis.SpeechSynthesizer())
{
   synth
.Speak("Hello World");
}


somewhere in your code.

Now, if you want do do that with the help of VoiceAttack and the plugin, again without any intervention on your part, then you might need to hack a bit... for example, you are probably gonna need a command that run continuosly which reads back the file every X seconds/X times per second and another command that execute some external program to clean the log after each call (my plugin do not touch the files it reads)

I'm just giving you a rough example here, i don't know the specifics of your log file or how IRC bots works... hope it helps getting you on the right path.

Tobias Frost

unread,
Apr 10, 2015, 5:26:19 AM4/10/15
to voice...@googlegroups.com
Thanks for responding so quickly.  I'm thinking it might be possible but I don't know if there are enough variables in the plugin currently.

Here's an example of the log file of the chat program I'm using currently:

[04:42:19] JOIN: tim, bob, dan

Using your sample profile and the read text regular expression command with VAReaderRegEx set to JOIN: (.*) it properly says only the names.  I can set the command to loop indefinitely, but I would need a way to tell it to begin at a certain point in the file to prevent reading the same names each time.  It would have to detect the last name read in each pass and set that as the new starting point for the next pass.  Even then, the same person leaving and coming back would break that logic I think.

Maybe an IRC bot is the way to go.

Thanks again.

Marc Thompson

unread,
Apr 10, 2015, 6:16:55 AM4/10/15
to voice...@googlegroups.com
Hi Luca,

When using the text reader is there a way to open the last modified file in a directory with a filter for the type of file, i.e. directory contains ".log" files but you are only interested in the files that start with "test.......log" or would I need to invoke another script to write the info to a static file for VA to read?

Cheers

M

Luca D

unread,
Apr 10, 2015, 6:35:57 AM4/10/15
to voice...@googlegroups.com
Reading only the last/first line of the file is simple enough (it will be there in my [almost ready] rewrite of the plugin), but avoiding the same person leaving and rejoining will require some specific logic that is a bit out of scope of the general purpose text reading stuff.

Luca D

unread,
Apr 10, 2015, 6:39:43 AM4/10/15
to voice...@googlegroups.com
No, not at the moment... you need to supply a specific file name/url.
But if you have a script/second plugin that can retrieve the name, you can combine both to achieve that.

Marc Thompson

unread,
Apr 10, 2015, 7:20:09 AM4/10/15
to voice...@googlegroups.com
Thanks Luca,

Another quick question on the RegEx, I have a multi line text file and I have the regex to match the last occurrence of a word in the file, problem comes in when I use the regex string in VA it only matches the first, how can I do a global modifier of "/s" with the plugin or is this not available?

Many Thanks

M

Luca D

unread,
Apr 10, 2015, 8:26:21 AM4/10/15
to voice...@googlegroups.com
The plugin code will only get you the first match.

RegEx support is pretty basic, was meant to act as a simple filter on the whole text; it reads the file, apply the regex (if any) and fetch the first match... the only other additional option supported is grouping; if your expression has a group defined, it will return that part instead of the whole match.

Marc Thompson

unread,
Apr 10, 2015, 8:29:51 AM4/10/15
to voice...@googlegroups.com
Thanks, managed to write a quick and dirty script to write the specific line of the file in to another file to be read.

Appreciate the assistance as usual..

M

Tobias Frost

unread,
Apr 10, 2015, 7:30:34 PM4/10/15
to voice...@googlegroups.com
Is it possible to have this plugin read the title bar of a running program?  I was thinking I could get it to read VLC player's title bar when I ask what song is playing.

Gary

unread,
Apr 10, 2015, 7:39:11 PM4/10/15
to voice...@googlegroups.com
Lol...  The next beta (coming very soon) has a token, '{ACTIVEWINDOWTITLE}' which will do just that.

There is also : '{ACTIVEWINDOWPROCESSNAME}' (what is seen in task manager) and, '{ACTIVEWINDOPROCESSID}'. 

Gary

Tobias Frost

unread,
Apr 11, 2015, 1:32:02 PM4/11/15
to voice...@googlegroups.com
Ahh great!

I wonder if it would be possible to have a variable that would make it read a random line from a .txt file.  I know you can put multiple responses into VA and it will pick one to read randomly, but it only gives you a single line text box to enter them.  It quickly gets very hard to find anything specific if you want to make edits.  Maybe I should suggest a change to the UI to make it easier?

Still, keeping a large list of responses to be read randomly with text to speech in a separate file would let you use things like Notepad++ to easily make changes.

Oh, I'm basically doing this:
say "what are you thinking about?"
VA picks one of a whole bunch of random responses.

Gary

unread,
Apr 11, 2015, 1:42:12 PM4/11/15
to voice...@googlegroups.com
The plugin could just read the entire file and stuff it into a text variable (the text would either have to be separated by semicolons already or you could read the lines in one at a time and concatenate with semicolons).  The text variable could then be used in TTS to return a random response.

Gary

unread,
Apr 11, 2015, 2:23:09 PM4/11/15
to voice...@googlegroups.com
The input box *is* small... well... *was*.  I increased the size ;)

Gary

Jesus S.

unread,
May 5, 2015, 8:23:29 AM5/5/15
to voice...@googlegroups.com
Hi Luca, at firts congrants for your plugin its a great job. I have a doubt. I try to read the galnet news in a zaonce times web "http://galnet.elitedangerous.es/". I try to read the news but I found a little problem.

I use your command VAReader to asing the url http://galnet.elitedangerous.es/?feed=rss2 this step is ok

I use your command VAReaderArgs to asing the parameters. I can´t find the correct xml tree to define the part of the text. If I use in this box the parameters title&summary, yes the voice attack readme the xml news but not the full news only the child element <description></description>. this is the sort article. the full article news is in the <content:encoded> </content:encoded>.

Can you help me to read the
<content:encoded> </content:encoded>. I try to find de correct child but I can not. Can you help me with this.

Best Regards


Luca D

unread,
May 6, 2015, 2:38:00 AM5/6/15
to voice...@googlegroups.com
If you are using the read_rss context, then you can't reach that child... it only uses some hard-coded, common RSS nodes, at the moment (<title>, <description> or the combination of both).

You could reach that value by using the generic read_xml option instead, of which there are also samples in my profile; this will allow free access to any node in the XML by manually specyfing the path to follow (in your case should be "channel\item\content:encoded")

Note however that, by its nature, the <content:encoded> node is suited for showing data, not reading them... it is meant to contain HTML tags for formatting, hyperlinks and such, as it is the case of the above feed, which is indeed full of <p>, <blockquote>, images ecc..
The end result would probably not be pleasant to read.

Regards

Jesus S.

unread,
May 6, 2015, 1:17:32 PM5/6/15
to voice...@googlegroups.com
Ok thanks, very helpfull for me.

Best regards

Andrew Martin

unread,
Jul 22, 2015, 8:34:28 AM7/22/15
to VoiceAttack
Hello Luca,

I have just started playing around with your amazing plug-in. I have a updating text file that pushes what is currently playing to other programs. I want to use it with voice attack. 

The text looks like this: Song - Band

I want to have the voice read it as "Currently we are listening to song by band." But I cannot get the VAReaderRegEx to look before the -. I feel like I am missing something obvious, but after a couple hours of effort, I have nothing to show for it. Any ideas?
Message has been deleted

Luca D

unread,
Jul 22, 2015, 9:57:43 AM7/22/15
to VoiceAttack
If i understand correctly your file format, and if you want to fetch BOTH "song" and "band", then you need to call the plugin twice with 2 different expressions (since the function only returnr one result at the time); save the result of the 1st call in a temp variable, then build your voice response by using both results

So, for the song name, use
VAReaderRegEx = ^(\w+) - \w+$

for the band name, use
VAReaderRegEx = ^\w+ - (\w+)$

Hope this helps

Andrew Martin

unread,
Jul 22, 2015, 1:48:02 PM7/22/15
to VoiceAttack
I think the variables are working... but I still haven't gotten the expressions to work. I apologize, I am very new to regular expression language. I am trying to learn it as I go.

I have attached a image of how I have it set up... I feel like I am going to be incredibly embarrassed when you point out the logical problem I have with this.

Thanks for the quick response before! I really appreciate it.
Voice Attack Music.png
Message has been deleted

Luca D

unread,
Jul 22, 2015, 4:35:24 PM7/22/15
to VoiceAttack
My bad: your profile is absolutely correct, but re-reading the regex i suggested, i realize now that it works only for single words song/bands... oops!
The correct ones are ^(.+) - .+$ and ^.+ - (.+)$, just replace those and it should work fine

Don't be embarrassed at all... regular expressions can be very confusing, i need to double and triple-check them everytime (as you noticed ;) )

Andrew Martin

unread,
Jul 23, 2015, 7:51:16 AM7/23/15
to VoiceAttack, antan...@yahoo.it
It took me forever... but I got it. Your expression worked, my problem was a complete lack of understanding in regards to how the plugin worked.

It all works now, and I learned a bunch of things, so it was well worth the time! Thank you for your assistance and for creating this great plug-in!

Chris Burgan

unread,
Sep 8, 2015, 9:41:41 AM9/8/15
to VoiceAttack
I've been unable to locate your source code. Am I missing something. This is the exact project I wanted to make to get back into coding and try to teach myself. I'm over the moon excited to read over your comments and see what I can learn.

Luca D

unread,
Sep 8, 2015, 10:54:07 AM9/8/15
to VoiceAttack
You haven't missed anything, there is no source code around for this one.

However, you might want to look at the source for a newer version, which i made quaite some time ago; it works and it got some additional stuff in, but i still havent released because i got a bit lazy and a) I had to write all the sample profiles and documentation again, and i hate that ;-) and b) there's so many things that got integrated in the newest VA versions and are not needed anymore, so i should actually remove those.

Anyway, here it is: https://github.com/Antaniserse/VAExtensions

Bodet

unread,
Mar 21, 2016, 8:11:48 AM3/21/16
to VoiceAttack
Oh dear, so many possibilities. Thank you great Sir.
Reply all
Reply to author
Forward
0 new messages