Dynamic text & spoken word

Post Reply
rjversluis
Site Admin
Posts: 39136
Joined: 10.04.2006, 08:48
Location: Speyer, Germany
Contact:

Dynamic text & spoken word

Post by rjversluis » 02.07.2010, 15:47

A new feature has been added to Rocrail which can make fun:

http://wiki.rocrail.net/doku.php?id=text-en#actions
https://bugs.launchpad.net/rocrail/+bug/600576

- Text strings can be generated with block and loco properties.
- Text objects can call actions at updates providing the new text as parameter.

Buddace
Posts: 951
Joined: 04.09.2008, 15:54
Contact:

Re: Dynamic text & spoken word

Post by Buddace » 02.07.2010, 18:03

rjversluis wrote:A new feature has been added to Rocrail which can make fun:

http://wiki.rocrail.net/doku.php?id=text-en#actions
https://bugs.launchpad.net/rocrail/+bug/600576

- Text strings can be generated with block and loco properties.
- Text objects can call actions at updates providing the new text as parameter.
Rob, can you post example please ?

rjversluis
Site Admin
Posts: 39136
Joined: 10.04.2006, 08:48
Location: Speyer, Germany
Contact:

Post by rjversluis » 02.07.2010, 18:11

Hi,

I included an example in the bug report.
Just clear all block reservations and put any of the locos in block 1.
Turnon Automode, start the loco, and click on the most left sensor of block 2.

To review the settings:
Check the actions, block 2 action controls and the text object.

Buddace
Posts: 951
Joined: 04.09.2008, 15:54
Contact:

Post by Buddace » 02.07.2010, 18:22

ok work but.....how set voice parameter ?? batch file...don't work

rjversluis
Site Admin
Posts: 39136
Joined: 10.04.2006, 08:48
Location: Speyer, Germany
Contact:

Post by rjversluis » 02.07.2010, 19:04

Just as with other external commands:

espeak -v Dutch

RainerK
Moderator
Posts: 3767
Joined: 29.04.2009, 09:31
Location: Sprockhövel (zwischen BO u. W)
Contact:

Post by RainerK » 02.07.2010, 20:39

Hi Rob,
phantastic feature :goodjob:

Testing with espeak in the virtual controller is a pleasure. :D

But the parameters %lcnr%, %bkloc% and %frombkloc% are in all cases empty. :(
In my testing have all blocks a locality (ortschaft) so i think the "loc"-parameters should be filled.
Or is a schedule therefore needed ?

What's that %lcnr% for :?:

Best regards
RainerK

rjversluis
Site Admin
Posts: 39136
Joined: 10.04.2006, 08:48
Location: Speyer, Germany
Contact:

Post by rjversluis » 02.07.2010, 20:58

Hi Rainer,

I did not test the location parameters.
But I will be soon and fix the problems.

It is a new feature which I implemented today, so it needs a little more time to get it stable.

But: Its a gag and I like it. ;-)

rjversluis
Site Admin
Posts: 39136
Joined: 10.04.2006, 08:48
Location: Speyer, Germany
Contact:

Post by rjversluis » 02.07.2010, 21:31

I must mention that those parameters are first available in revno 1715.

ron&bram
Posts: 2492
Joined: 11.06.2008, 19:34
Location: Heemskerk, Netherlands

Post by ron&bram » 02.07.2010, 21:32

Hi Rob,

This optioon is real fun. One of the two reversing loops is in another room. With this option I can hear which loc is entering the last block of the loop before entering the station without having to keep one on the screen.

:goodjob:, Ronald

RainerK
Moderator
Posts: 3767
Joined: 29.04.2009, 09:31
Location: Sprockhövel (zwischen BO u. W)
Contact:

Post by RainerK » 02.07.2010, 22:40

Hi Rob,
rjversluis wrote:I must mention that those parameters are first available in revno 1715.
Please understand my info only as an info.

Best regard
RainerK

Buddace
Posts: 951
Joined: 04.09.2008, 15:54
Contact:

Post by Buddace » 02.07.2010, 22:49

Rob I have two suggestion:
IMHO need to create a new information record about location/bloc : track number.
In your working sample work wit ID block...but in our layout we have a lot of station with one track one anyone :)
CFor locomotive, can set another information record about train name.....I Italy there are some special train with name IE: Paris Milan is "Alessadnro Manzoni" and stations peake spek: "Train EC 1940 Alessandro Manzoni from Paris to Milan incoming track 2"

Last is info can pass parameter like "-vit+f3" via rocrail ? I would like alternate female/male voice :)

ron&bram
Posts: 2492
Joined: 11.06.2008, 19:34
Location: Heemskerk, Netherlands

Post by ron&bram » 03.07.2010, 00:00

Hi Buddace,

I have tested with the following command in the action definition:

espeak -vnl+f2

nl for Dutch, f2 for female pitch 2. This works fine.

Best regards, Ronald

Buddace
Posts: 951
Joined: 04.09.2008, 15:54
Contact:

Post by Buddace » 03.07.2010, 00:50

ron&bram wrote:Hi Buddace,

I have tested with the following command in the action definition:

espeak -vnl+f2

nl for Dutch, f2 for female pitch 2. This works fine.

Best regards, Ronald
Where set this ?? In run external program parameter ????

rjversluis
Site Admin
Posts: 39136
Joined: 10.04.2006, 08:48
Location: Speyer, Germany
Contact:

Post by rjversluis » 03.07.2010, 07:09

The locations are fixed and can be tested with revision 1716.

Code: Select all

NS1110   OText    0127 text event [NS1110-2][Op perron %bkid% loopt trein %lcid% binnen. Locatie is %bkloc%. De trein kwam uit %frombkloc%.]
NS1110   OModel   2755 try to find location for block [2]
NS1110   OModel   2734 check if block [2] is in location [Rotterdam](2)
NS1110   OModel   2755 try to find location for block [1]
NS1110   OModel   2734 check if block [1] is in location [Rotterdam](2)
NS1110   OModel   2734 check if block [1] is in location [Amsterdam](1)
NS1110   OText    0076 try to resolve [bkid]
NS1110   OText    0076 try to resolve [lcid]
NS1110   OText    0076 try to resolve [bkloc]
NS1110   OText    0076 try to resolve [frombkloc]
NS1110   OText    0146 new text [Op perron 2 loopt trein NS1110 binnen. Locatie is Rotterdam. De trein kwam uit Amsterdam.]
NS1110   OAction  0624 Action espeak [ext-:espeak] 
NS1110   OAction  0289 Action execution espeak [ext-:espeak] 
NS1110   OAction  0336 executing [espeak -vnl+f2 "Op perron 2 loopt trein NS1110 binnen. Locatie is Rotterdam. De trein kwam uit Amsterdam."]
NS1110   OText    0156 broadcast text [Op perron 2 loopt trein NS1110 binnen. Locatie is Rotterdam. De trein kwam uit Amsterdam.]
NS1110   OLcDrive 0175 Found destination for "NS1110": "3" (from 2)
OSystem  OSystem  0341 system = espeak -vnl+f2 "Op perron 2 loopt trein NS1110 binnen. Locatie is Rotterdam. De trein kwam uit Amsterdam."

rjversluis
Site Admin
Posts: 39136
Joined: 10.04.2006, 08:48
Location: Speyer, Germany
Contact:

Post by rjversluis » 03.07.2010, 07:11

The setup:

Code: Select all

  <aclist>
    <ac id="Speak2Me" prev_id="Speak2Me" timed="false" hour="0" min="0" cmd="update" oid="text1" actiontime="0" param="Op perron %bkid% loopt trein %lcid% binnen. Locatie is %bkloc%. De trein kwam uit %frombkloc%." timer="0" type="tx"/>
    <ac id="espeak" prev_id="espeak" timed="false" hour="0" min="0" cmd="espeak" oid="" actiontime="0" param="-vnl+f2" timer="0" type="ext"/>
  </aclist>
  <txlist>
    <tx text="Op perron 2 loopt trein NS1110 binnen. Locatie is Rotterdam. De trein kwam uit Amsterdam." id="text1" x="8" y="7" z="0" prev_id="text1" desc="" pointsize="0" bold="false" underlined="false" italic="false" transparent="true" ori="west" cx="20" cy="1">
      <actionctrl id="espeak" auto="true" manual="true" state="" param="Op perron 2 loopt trein MAT54 binnen. Locatie is . De trein kwam uit ."/>
    </tx>
  </txlist>
The param field for ext. actions can also be used with revision 1716.

Post Reply

Return to “Automatic mode”