RadioDJ tutorials


Setup of the TTS plugin.

You can use a voice of IVONA text to speech




To use it, import the files from the Disabled Plugins folder from the folder Plugin TTS to the plugin folder, don't forget the folder TTS-Templates.

Actually, after a restart of RDJ, you can already use the plugin. The voice that will be used in the standard setup is Microsoft Anna.


The SAY button can be use to say the text what you put, pasta in the screen (you can use variables to, like: It's a cover from $original_artist$ (Note: $original_artist$ it a example not inplanted yet.).

The SAY TIME button will say the pc time.

The STOP button, shall stop the tts plugin from saying things.


The ENABLED button will stop the TTS plugin.

If you enabled the box Speak Track Comments, it will say the texts in the comments.


You can adjust the files in the folder TTS-Templates.


Current Time.txt

News.xml

NowPlaying.xml

Requests.xml


Just showing the NowPlaying.xml in it is the texts.


<?xml version="1.0" encoding="utf-8"?>

<Table>

<Settings>

<Tracks2Speak>3</Tracks2Speak>

</Settings>

<Message>

<Voice>0</Voice>

<tts>It's $now-hour$ and $now-minute$ minutes now, and we are listening $artist$, $title$. Enjoy!</tts>

</Message>

<Message>

<Voice>0</Voice>


</Message>

<Message>

<Voice>0</Voice>

<tts>Now, we will listen to $artist$, right here on RadioDJ, stay tuned for more great music!</tts>

</Message>

<Message>

<Voice>0</Voice>

<tts>This was a great song, but now it's time to move to another great artist: $artist$ and to listen the track $title$.</tts>

</Message>

</Table>


The part <Tracks2Speak>3</Tracks2Speak> will set that after 3 tracks it had to speak the first line like:

<tts>It's $now-hour$ and $now-minute$ minutes now, and we are listening $artist$, $title$. Enjoy!</tts>


after 6 tracks speak line two:


<tts>Well, it's a beautiful weather outside and you are still listening our station! That's great! Now, we are listening $artist$, $title$!</tts>


etc...

If all the line are used, start again with line 1.


the 0 in <Voice>0</Voice> indicate, use voice number 0 its Anna in this case.




More is possible whit the good old baths file.

Like adjust to the morning, midday, evening or night.


well you can play with the TTS template files, and load with another voice, by using a .bat file and using the event run application at a specified time.

Like morning.bat


The code in morning.bat =


@ECHO OFF

COPY /Y morning.txt NowPlaying.xml

In the morning.txt is filed in:

<?xml version="1.0" encoding="utf-8"?>
<Table>
<Settings>
<Tracks2Speak>3</Tracks2Speak>
</Settings>
<Message>
<Voice>0</Voice>
<tts>It's $now-hour$ and $now-minute$ minutes in the morning, and you are listening $artist$, $title$. Enjoy!</tts>
</Message>
<Message>
<Voice>0</Voice>
<tts>Well, this morning, it's a beautiful weather outside and you are still listening our station! That's great! Now, you are listening to, $artist$, with,  $title$!</tts>
</Message>
<Message>
<Voice>0</Voice>
<tts>Now, we will listen this morning to, $artist$, right here on RadioDJ, stay tuned for more great music!</tts>
</Message>
<Message>
<Voice>0</Voice>
<tts>This was a great song, but now it's time to move to another great artist like: $artist$ and listen to, $title$, on this morning.</tts>
</Message>
</Table>


The <Voice>0</Voice> where the 0 is the first voice.
<Voice>1</Voice> is the second voice.

So you have to make two files with the same name (use a plain editor like note pad) like.


Artist.bat
Artist.txt


And the copy code in Artist.bat is then

@ECHO OFF

COPY /Y Artist.txt NowPlaying.xml


The /Y is for don't ask permission to do, just run.

Well now using some automation for changing the NowPlaying.xml file.


Using a event:


In the event maker you can make a event to run a application, the only problem is that the application must be a .exe file hi will not see a .bat file.


You should be sure to know / understand that RadioDJ works from its own directory, with the use of Run Application.


So you have to change the lines in the .bat file like:


@ECHO OFF

COPY /Y Artist.txt NowPlaying.xml


To:


@ECHO OFF

COPY /Y c:\RDJ-folder\Plugins\TTS-Templates\Artist.txt c:\RDJ-folder\Plugins\TTS-Templates\NowPlaying.xml



But now a tricky part, how to make a baths file to a .exe file to use in RadioDJ?

Just ferry simple.......

On the download page there is a application whit the name Baths To Exe file.zip download it!

It's a portable and free program in different languages..


Run it to make from the a .bat a .exe file.


Now using a event:


Open the event manager and make a new event..




Click on the green plus.




When you select Run Application a screen pops up, select the .exe file, click on open.


Save your new event.


That's all.


So you know you have to make different .bat and .txt files and you must make different .exe files an special events for it.


Well it's just some old school dos programming in a baths file.

If you like to put in some comment in the baths file use then:


REM my comment on this line.


Back to top
©  JWL  2013 | 2017