# Speaker.bot TTS Finished Trigger

**URL:** <https://extensions.streamer.bot/t/speaker-bot-tts-finished-trigger/308>\
**Category:** Approved\
**Tags:** youtube, twitch, tts\
**Created:** [September 18, 2023, 1:11pm UTC](https://extensions.streamer.bot/t/speaker-bot-tts-finished-trigger/308 "2023-09-18T13:11:18Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sinistral2099](https://extensions.streamer.bot/user_avatar/extensions.streamer.bot/sinistral2099/32/685_2.png) [@Sinistral2099](https://extensions.streamer.bot/u/Sinistral2099)\
**Post date:** [September 18, 2023, 1:11pm UTC](https://extensions.streamer.bot/t/speaker-bot-tts-finished-trigger/308/1 "2023-09-18T13:11:18Z")

</div>

## Description

Adds a custom Text-to-Speech Finished trigger that fires when Speaker.bot is finished speaking.

## Import Code

This plugin is for use with Streamer.bot 0.2.0-0.2.2, and Speaker.bot 0.1.1 **ONLY**. It will be deprecated once Streamer.bot 0.2.3 reaches Stable release as new interoperability between Streamer.bot 0.2.3 and Speaker.bot 0.1.2 includes similar functionality. Because Speaker.bot 0.1.2 made changes to the timing of when the audio file is saved, this trigger does not fire at the correct time when using that version.

[Speaker.bot TTS Finished Trigger by Sinistral2099.sb](https://extensions.streamer.bot/uploads/short-url/9lSBdEoQwsabwwcThGUYJ0PHVXV.sb) (1.9 KB)

## Installation

1. In Streamer.bot click on `Import`

 ![Install01](https://extensions.streamer.bot/uploads/default/original/1X/ab48503427e4bded4d3f24416670da0c652ad075.png)

1. Drag the Import File into `Import String`.

 ![Install02](https://extensions.streamer.bot/uploads/default/original/1X/fbe14d2e87bf0d54832c94499a03eac28a400d2c.png)

1. Once the code is imported, make sure the `Execute Code` Sub Actions compile for both Actions.

## Configuration

### Speaker.bot

1. In Speaker.bot, go to `Settings`.
2. If you are not already on it, go to the `General` tab.
3. Enable `Save TTS audio to file`.
4. Choose a directory for the files to be saved to.

 ![Configure-Speaker-01](https://extensions.streamer.bot/uploads/default/original/1X/eb7f4b6968ac1af5286d0b56ccb6db667c3bc997.png)

### Streamer.bot

1. Next, go to the **Speaker.bot TTS Finished Trigger** Action, and double click on the `File Watcher` trigger.
2. Click the `Create New Trigger` button.

 ![Configure-Streamer-02](https://extensions.streamer.bot/uploads/default/original/1X/b9766d7b1c862958117d10b69e6b2084cff0eae3.png)

1. Choose the folder that you chose to save the TTS audio files to in Speaker.bot.
2. Change the filter text to “\*.wav” and click OK.

 ![Configure-Streamer-04](https://extensions.streamer.bot/uploads/default/original/1X/8653ac0f10783e51971e4d01db58968de41f0dcc.png)

1. The new File Watcher should now be selected. If so, click OK.
2. Done.

If the directory that you chose in Speaker.bot and the directory that you chose in the Streamer.bot File Watcher do not match, this trigger will not work.

## How It Works

Speaker.bot only creates the WAV file after it is finished speaking the voice, so this extension watches for the creation of that file, activates the Trigger, and then deletes the WAV file.

The new Trigger can be found under **Custom → Speaker.bot → Text-to-Speech Finished**.

Now you can trigger Actions when Speaker.bot is finished speaking, rather than rely on an estimated delay calculation.

---

<div class="post-metadata">

**Author:** ![GoWMan](https://extensions.streamer.bot/user_avatar/extensions.streamer.bot/gowman/32/4_2.png) [@GoWMan](https://extensions.streamer.bot/u/GoWMan)\
**Post date:** [September 23, 2023, 4:00pm UTC](https://extensions.streamer.bot/t/speaker-bot-tts-finished-trigger/308/2 "2023-09-23T16:00:24Z")

</div>

Only things I see here so far is just adding a Table of Contents into your post and unless you’re shouting out other contributors you wouldn’t really need that section. I know @pwnyy had that in the template but I believe he’s altering that cause with this system the dev owns the post and socials in the profile can be found quickly by hovering over their pfp.

Other than that I think this looks fine to me.

---

<div class="post-metadata">

**Author:** ![Sinistral2099](https://extensions.streamer.bot/user_avatar/extensions.streamer.bot/sinistral2099/32/685_2.png) [@Sinistral2099](https://extensions.streamer.bot/u/Sinistral2099)\
**Post date:** [September 24, 2023, 3:11am UTC](https://extensions.streamer.bot/t/speaker-bot-tts-finished-trigger/308/3 "2023-09-24T03:11:04Z")

</div>

I removed the contributors section. The TOC was already in there at the bottom, but it displays on the upper right next to the listing? It’s easy to miss. 😕

---

<div class="post-metadata">

**Author:** ![GoWMan](https://extensions.streamer.bot/user_avatar/extensions.streamer.bot/gowman/32/4_2.png) [@GoWMan](https://extensions.streamer.bot/u/GoWMan)\
**Post date:** [September 24, 2023, 6:57am UTC](https://extensions.streamer.bot/t/speaker-bot-tts-finished-trigger/308/4 "2023-09-24T06:57:27Z")

</div>

You’re good. My bad, I didn’t actually want to edit your post so I didn’t even notice it was at the bottom so that’s good to know that works. Cause I always do it at the top first thing lol.

---

<div class="post-metadata">

**Author:** ![Sinistral2099](https://extensions.streamer.bot/user_avatar/extensions.streamer.bot/sinistral2099/32/685_2.png) [@Sinistral2099](https://extensions.streamer.bot/u/Sinistral2099)\
**Post date:** [September 25, 2023, 6:40am UTC](https://extensions.streamer.bot/t/speaker-bot-tts-finished-trigger/308/5 "2023-09-25T06:40:48Z")

</div>

Is there a next step that I need to take to get it approved and on the Extensions list?

---

<div class="post-metadata">

**Author:** ![GoWMan](https://extensions.streamer.bot/user_avatar/extensions.streamer.bot/gowman/32/4_2.png) [@GoWMan](https://extensions.streamer.bot/u/GoWMan)\
**Post date:** [September 25, 2023, 6:25pm UTC](https://extensions.streamer.bot/t/speaker-bot-tts-finished-trigger/308/6 "2023-09-25T18:25:49Z")

</div>

Nope you’re good. I’ll poke the others to mark their approval or comments. I know 2 of us have voted just waiting on a couple more and then we’ll move it. Trying not to have me be the deciding person here 😂

---

<div class="post-metadata">

**Author:** ![rondhi](https://extensions.streamer.bot/user_avatar/extensions.streamer.bot/rondhi/32/24_2.png) [@rondhi](https://extensions.streamer.bot/u/rondhi)\
**Post date:** [September 25, 2023, 7:39pm UTC](https://extensions.streamer.bot/t/speaker-bot-tts-finished-trigger/308/7 "2023-09-25T19:39:14Z")

</div>

Seems to work for me. 👍
