Model Railway Forum banner

Computer, Speech and RailDriver Control

16149 Views 47 Replies 17 Participants Last post by  darren mark green
3
I've been having a bit of a play this easter weekend... I'm writing my own computer interface software and have just rewritten it all to tidy a few things up as well as start getting some simple user interfaces on it.

My DCC system is a Hornby Elite, so chosen because it gives me fairly high end features plus the computer interface at a remarkably low cost, even the Dynamis can't compete in this area imho (note: not saying one or the other is better, I like both systems quite a lot - but I specifically wanted a computer interface and for the Dynamis that means you're looking at more like double the cost of the elite). Anyway, enough apologising for choosing Hornby...

The first video demo shows the software in action, it's pretty basic right now. It's got some throttle controls for driving on the screen both simple and advanced, and also a RailDriver throttle.


Simple - Single slider, does what you'd expect, higher it goes the faster the train goes.

Advanced - Dual sliders, one for throttle and one for brake - you should be able to figure out how they work


RailDriver - Interfaces to the PI Engineering RailDriver (http://www.raildriver.com) to talk to your DCC system via the PC. Requires no other drivers or set up, it's all contained in my code.

Function controls are supported (as demonstrated), but accessories, feedback etc will have to come later when I have access to that kind of equipment.

The plan for the software is for it to be very easy to use and free with full layout and locomotive control. Currently it talks Xpressnet over the serial port so anything that supports it should be fine (LI-101-F, LI-USB and Hornby Elite I'm pretty sure should/do work fine) - if I get access to other equipment i'll add in support for those also.

In addition to the application itself, which is what i'm sure the majority will be more interested in, there will also be a separate software developers library which will allow any of you budding programmers to go download yourselves a free copy of Visual Studio Express and start writing your own software very easily and quickly. It's specifically designed to be a publicly visible API and is therefore very easy to use.

The library will be free to download and use within personal or freely distributed software, however if you want to use it in a commercial / shareware application then a different license will apply.

If you don't know code or aren't interested, skip on down for the next demo


I use Visual C#.NET - but VB.NET will work just as well.

CODEDccDevice device = DccDeviceFactory.Instance.createDccDevice("HORNBY-ELITE");
ConfigurableValue comPort = device.getConfigurableValue("ComPort");
ConfigurableValue baud = device.getConfigurableValue("BaudRate");
comPort.Value = "COM4";
baud.Value = "9600";
device.startDevice();

That got us connected and talking to the railway on COM4 at 9600 baud. Note: You can "ask" a configurable value what it's possible options are too, that's how the drop down boxes in my application are pre-filled in.

CODELoco eurostar = device.newLoco(11);

Create a "Loco" addressed to number 11.

CODEeurostar.setFunctionStatus(0, true);

Turn the lights on!

CODEcurrentLoco.setDirection(Dcc.enumDirection.Forwards);

Set the direction to Forwards.

CODEcurrentLoco.setSpeed(30);

Start the loco moving at speed step 30.

Hopefully you get the idea, dead easy.

Anyway, moving on to the second demo which I produced this morning. This one isn't actually integrated in to the main application yet, it started out as a simple test of doing speech recognition in a test application and then once I got it working reasonably reliably I railway-enabled it in about 5 minutes to produce this:


Essentially it works by having a set of voice commands each of which are mapped to various operations like direction, speed, and the functions. How and what you map are entirely up to you (or will be when I wrap a nice configuration around it!).

I found speech control extremely usable, once you get over feeling like a prat for talking to your railway the fact that you're hands free and possibly also wire free (if you have such a headset) and simply talking to the loco you want and telling it what you want is great, it's like there's another person operating the trains and you're just talking to them (which I can assure you is NOT taking place in this video
). The quality of speech recognition isn't bad either, it took about 20 minutes to make the video and in all that time I think it mis-heard me twice, and didn't understand me three times - and I gave it lots to do, lots more than is on the 10 minute video.

The speech capability is just using the stuff built in to Windows Vista (possibly works with XP also, not tried) - so no extra cost to make it work. The speech engine in Vista is thankfully pretty reasonable and what you're seeing there is a completely untrained engine, so if I go through the training sequence then certainly it's going to get even more accurate.

No idea when I'm going to get the first release of any of this out yet, hopefully soon though as a more polished version of what is in the demo's here.

Thanks for your time, I look forward to any comments and feedback!

Regards,
Matt.
UKTrainSim
See less See more
1 - 1 of 48 Posts
Speech recognition is still developing and as a a basis you should assume that most utilities will require specific recognition that will over come most accent issues. Dunno about Scottish though, don't think there is a program in the world that will have the ability to decipher that. Mandarin Chinese would be easier I reckon (Dad's from Glasgow!!)
1 - 1 of 48 Posts
This is an older thread, you may not receive a response, and could be reviving an old thread. Please consider creating a new thread.
Top