Dynamic text & spoken word

Moderator: Moderators

Dynamic text & spoken word

Postby 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.
Best Regards, Rob.
:!: PS: Do not forget to attach the usual files.
:!: PS: Nicht vergessen die übliche Dateien an zu hängen.
[ macOS - Linux] - [ N: CBus - CAN-GCA ] - [ 0: RocNetNode - GCA-Pi ]
rjversluis
Site Admin
 

Re: Dynamic text & spoken word

Postby 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 ?
www.dccworld.com First and Only Italian DCC Website.

TMWDCC/TBX , zDCC, Lokmaus 2, Arnold DCC, Intellibox, Hornby Select, A lot of Loconet DIY (Loconet SwitcBoard, Loconet P50, etc..)
Buddace
 

Postby 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.
Best Regards, Rob.
:!: PS: Do not forget to attach the usual files.
:!: PS: Nicht vergessen die übliche Dateien an zu hängen.
[ macOS - Linux] - [ N: CBus - CAN-GCA ] - [ 0: RocNetNode - GCA-Pi ]
rjversluis
Site Admin
 

Postby Buddace » 02.07.2010, 18:22

ok work but.....how set voice parameter ?? batch file...don't work
www.dccworld.com First and Only Italian DCC Website.

TMWDCC/TBX , zDCC, Lokmaus 2, Arnold DCC, Intellibox, Hornby Select, A lot of Loconet DIY (Loconet SwitcBoard, Loconet P50, etc..)
Buddace
 

Postby rjversluis » 02.07.2010, 19:04

Just as with other external commands:

espeak -v Dutch
Best Regards, Rob.
:!: PS: Do not forget to attach the usual files.
:!: PS: Nicht vergessen die übliche Dateien an zu hängen.
[ macOS - Linux] - [ N: CBus - CAN-GCA ] - [ 0: RocNetNode - GCA-Pi ]
rjversluis
Site Admin
 

Postby 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
RainerK
 

Postby 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. ;-)
Best Regards, Rob.
:!: PS: Do not forget to attach the usual files.
:!: PS: Nicht vergessen die übliche Dateien an zu hängen.
[ macOS - Linux] - [ N: CBus - CAN-GCA ] - [ 0: RocNetNode - GCA-Pi ]
rjversluis
Site Admin
 

Postby rjversluis » 02.07.2010, 21:31

I must mention that those parameters are first available in revno 1715.
Best Regards, Rob.
:!: PS: Do not forget to attach the usual files.
:!: PS: Nicht vergessen die übliche Dateien an zu hängen.
[ macOS - Linux] - [ N: CBus - CAN-GCA ] - [ 0: RocNetNode - GCA-Pi ]
rjversluis
Site Admin
 

Postby 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
Best regards, Viele Grüsse, vriendelijke groeten, Ronald :rr_cap:
GCA85/50/93/145/146/153 Loconet, Twincenter+booster for locs, seperate booster for accessory decoders, dedicated laptop with XP and Ubuntu for Rocrail, AndRoc, LGB indoor OTF layout
ron&bram
 

Postby 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
RainerK
 

Postby 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 :)
www.dccworld.com First and Only Italian DCC Website.

TMWDCC/TBX , zDCC, Lokmaus 2, Arnold DCC, Intellibox, Hornby Select, A lot of Loconet DIY (Loconet SwitcBoard, Loconet P50, etc..)
Buddace
 

Postby 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
Best regards, Viele Grüsse, vriendelijke groeten, Ronald :rr_cap:
GCA85/50/93/145/146/153 Loconet, Twincenter+booster for locs, seperate booster for accessory decoders, dedicated laptop with XP and Ubuntu for Rocrail, AndRoc, LGB indoor OTF layout
ron&bram
 

Postby 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 ????
www.dccworld.com First and Only Italian DCC Website.

TMWDCC/TBX , zDCC, Lokmaus 2, Arnold DCC, Intellibox, Hornby Select, A lot of Loconet DIY (Loconet SwitcBoard, Loconet P50, etc..)
Buddace
 

Postby 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."
Best Regards, Rob.
:!: PS: Do not forget to attach the usual files.
:!: PS: Nicht vergessen die übliche Dateien an zu hängen.
[ macOS - Linux] - [ N: CBus - CAN-GCA ] - [ 0: RocNetNode - GCA-Pi ]
rjversluis
Site Admin
 

Postby 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.
Best Regards, Rob.
:!: PS: Do not forget to attach the usual files.
:!: PS: Nicht vergessen die übliche Dateien an zu hängen.
[ macOS - Linux] - [ N: CBus - CAN-GCA ] - [ 0: RocNetNode - GCA-Pi ]
rjversluis
Site Admin
 

Next

Return to Automatic mode