Stop Voice

Stop playing voice audio

Description

'stop voice [voice_id] [with fade <time>]'

The stop voice action will let you stop either all voices currently playing or only one in specific. To learn more about voices, read the Play Voice documentation.

Note: Voice audio is automatically stopped when the player advances to the next statement. This action is useful when you want to stop a voice before the player proceeds, or when you have looping voice audio.

Action ID: Stop

Reversible: Yes (restores the previously playing voices from history)

Requires User Interaction: No

Parameters

Name
Type
Description

voice_id

string

Optional. The name of the specific voice you want to stop. If omitted, all voices will be stopped.

fade

number

Optional. Fade out time in seconds.

Examples

Stop a Specific Voice

The following will stop a specific voice, identified by its name.

monogatari.script({
    'Start': [
        'play voice dialog_002 with loop',
        'The previous voice will be repeating itself over and over',
        'play voice dialog_001',
        'Two voices are currently playing',
        'stop voice dialog_002',
        'Now the first one has stopped and the second one will stop as soon as it ends',
        'end'
    ]
});

Stop All Voices

The following will stop all voices currently playing.

Fade Out Effect

The following will stop the voice with a fade out effect. You can also use a fade out effect when stopping all voices.

Fade Out All Voices

  • Play Voice - Play voice audio

  • Pause - Pause playing media (can be resumed later)

Last updated

Was this helpful?