[Scr/Exe] Text To Speech

The place to discuss scripting and game modifications for X³: Reunion.

Moderators: Moderators for English X Forum, Scripting / Modding Moderators

Post Reply
User avatar
Gazz
Posts: 12430
Joined: Fri, 13. Jan 06, 17:39
x3tc

[Scr/Exe] Text To Speech

Post by Gazz » Fri, 4. Jul 08, 15:49

This script/exe uses the Microsoft speech API to let X3 scripts speak.

Supposedly the MS Speech SDK comes preinstalled on WinXP but if it's not there you can download it here:
MS Speech SDK 5.1 (68 MB)


To install:
Dump contents of ZIP into the X3 main folder.

To use:
Run X3-TTS.exe, ideally before starting X3.

You should now get a spoken welcome message after loading X3.

If your script wants something spoken, pass the string to plugin.gz.text.to.speech.

Image (ZIP)
My complete script download page. . . . . . I AM THE LAW!
There is no sense crying over every mistake. You just keep on trying till you run out of cake.

User avatar
Tenlar Scarflame
Posts: 3343
Joined: Mon, 30. May 05, 04:51
xr

Post by Tenlar Scarflame » Fri, 4. Jul 08, 17:12

oooh... this could be quite fun in the future. :D
My music - Von Neumann's Children - Lasers and Tactics

I'm on Twitch! 21:15 EST Sundays. Come watch me die a lot.

User avatar
ezra-r
Posts: 3133
Joined: Fri, 14. Oct 05, 21:04
x4

Post by ezra-r » Fri, 4. Jul 08, 18:06

amazing!

cba999
Posts: 7
Joined: Mon, 20. Oct 08, 02:01
x3ap

Post by cba999 » Thu, 8. Nov 12, 04:05

euh , can you make a youtube video of how you do it , becose script and plugin in x3 , hmmmm thats new for me

User avatar
X2-Illuminatus
Moderator (Deutsch)
Moderator (Deutsch)
Posts: 21311
Joined: Sun, 2. Apr 06, 16:38
x4

Post by X2-Illuminatus » Thu, 8. Nov 12, 15:20

This script is mostly something for scripters, who want to add spoken texts to their scripts. If you don't have any experience in scripting this script won't be of any big use for you.

In any way, the basic way of using it would be:

After the script is installed, activate and open the Script Editor. When you're in the Script Editor click on <New script> and give your script a name. (The list of scripts is sorted alphabetically. So for example, a script name starting with "a" will help you finding your script at the top of the list.) Afterwards in the Code window of the script editor, select a line and press 'Enter' to bring up the list of possible commands. Under General Commands -> Script Calls select the command "@ <RetVar/IF/START> = <Refobj> -> call script <Script Name>: <Parameter>".
It should ask you to select a script from the list of available scripts. Select the script "plugin.gz.text.to.speech". Now the script line should be displayed with three open input fields. By selecting the input fields (either with the mouse or by navigating with the arrow keys to them and pressing Enter) you get a list of possible input values. In the first input fields enter / select the Start parameter. The second wants to know an object to run the script on: select [THIS]. The third one is the actual text to speak. Over <string> you can enter a text string here or over <variable> a variable that contains a text string.

The line in your Code window should now look like the following:

Code: Select all

START [THIS] -> call script 'plugin.gz.text.to.speech' :  Text to speak='Text'
Now press 'Esc' to close the script window and confirm the message asking you, if you want to save your script. Afterwards, in the list of scripts mark your script and press "R" and two times Enter. Then your text should be spoken.
Die komplette X-Roman-Reihe jetzt als Kindle E-Books! (Farnhams Legende, Nopileos, X3: Yoshiko, X3: Hüter der Tore, X3: Wächter der Erde)

Neuauflage der fünf X-Romane als Taschenbuch

The official X-novels Farnham's Legend and Nopileos as Kindle e-books!

Post Reply

Return to “X³: Reunion - Scripts and Modding”