Run the SAM Text-To-Speech (TTS) inside Construct 3!
Author: Master Pose
Website: https://github.com/MasterPose/c3-sam
Addon Url: https://github.com/MasterPose/c3-sam
Download Latest Version : Version: 1.0.0.0
Made using c3-framework
First you must install the dependencies via NPM using:
npm install
To build the addon, run the following command:
npx c3fo build
To start the dev server, run:
npx c3fo build -D
The build uses the addon.ts file for the configurations and the runtime.ts file as the entry point to generate everything else.
The files defined with @AceClass contain all the Actions, Conditions and Expressions logic and configuration, you may want to check them.
| Property Name | Description | Type |
|---|---|---|
| Default Speed | The default speed for the TTS | integer |
| Default Pitch | The default pitch for the TTS | integer |
| Default Throat | The default throat for the TTS | integer |
| Default Mouth | The default mouth for the TTS | integer |
| Action | Description | Params |
|---|---|---|
| Start Speech | Starts a speech using the global parameters. | Text (string) Tag (string) |
| Start speech as | Starts a speech using parameters from list a of pre-defined typical settings. | Text (string) Character (combo) Tag (string) |
| Start Speech Using Parameters | Starts a speech independently, manually setting all parameters. | Text (string) Speed (number) Pitch (number) Throat (number) Mouth (number) db (number) Tag (string) |
| Stop Speech | Stops a speech of a given tag. | Tag (string) |
| Stop All Speeches | Stops all playing speeches. | |
| Set Volume | Sets the volume parameter. | Db (number) |
| Set Pitch | Sets the global pitch parameter. | Pitch (number) |
| Set Speed | Sets the global speed parameter. | Speed (number) |
| Set Mouth | Sets the global mouth parameter. | Mouth (number) |
| Set Throat | Sets the global throat parameter. | Throat (number) |
| Reset Volume | Resets the current volume value to its default one. | |
| Reset All Properties | Resets the current global values to their default ones. |
| Condition | Description | Params |
|---|---|---|
| On Any Speech Start | Triggered when any speech starts. | |
| On Any Speech End | Triggered when any speech ends. | |
| On Any Speech Stop | Triggered when any speech was stopped. | |
| On Any Error | Triggered when any error happens. | |
| On Speech Start | Triggered when a speech has started. | Tag (string) |
| On Speech End | Triggered when a speech has ended (not stopped). | Tag (string) |
| On Speech Stop | Triggered when a speech was stopped. | Tag (string) |
| On Error | Triggered when an error happens. | Tag (string) |
| Expression | Description | Return Type | Params |
|---|---|---|---|
| lastTag | The latest tag relevant to the the current trigger. | string | |
| lastError | The latest error that was thrown. | string | |
| volume | The current global volume. | number | |
| pitch | The current global pitch. | number | |
| speed | The current global speed. | number | |
| mouth | The current global mouth. | number | |
| throat | The current global throat. | number |