Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(effects): Searchable Voices in TTS Effect (#3000) #3012

Merged
merged 4 commits into from
Mar 11, 2025

Conversation

phroggster
Copy link
Collaborator

Description of the Change

  • Switch the Text-To-Speech effect to using a ui-select searchable element that allows for plain text-based filtering.
  • Changed the effect description to include the text "TTS" for search optimization.

Applicable Issues

#3000

Testing

  • Old effects displayed properly in edit.
  • Old effects executed and ran properly.
  • New effects serialized properly.
  • Old effects serialized properly.
  • Verified appropriate defaults.
  • Verified default was searchable in the list.

Screenshots (before PR)

Default state of a new effect (expanded):
before


Screenshots (after PR)

Default state of a new effect (collapsed):
after-defaults-collapsed

Default state of a new effect (expanded):
after-defaults-expanded

Searching:
after-canada-search

Selected:
after-linda-selected

Searching for "default":
after-default-is-searchable

- Switch the Text-To-Speech effect to using a ui-select searchable
  element that allows for plain text-based filtering.
- Add TTS to the effect's description, solely for searchability.
- per crowbartools#3000
@phroggster phroggster requested a review from ebiggz as a code owner February 21, 2025 04:53
Copy link
Member

@ebiggz ebiggz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Much needed improvement - thanks for doing this!

I do have one ask:
A number of months back I created a genericized firebot wrapper component for <ui-select> to cut down on the boilerplate, called <firebot-searchable-select>. Could we update this PR to utilize that component instead? (I realize there are many places still using ui-select directly that I have yet to refactor that I assume you originally referenced, sorry about that).

The objects in the ttsVoice array are actually already in the correct shape for <firebot-searchable-select>, so I believe you should be able to just plop in:

<firebot-searchable-select
    ng-model="effect.voiceId"
    placeholder="Select or search for a voice…"
    items="ttsVoices"
 />

The component also supports an optional "description" property on items so you could additionally adjust the item for the default voice like so:

{
   id: "default",
   name: "Default",
   description: "The default voice set in Settings > TTS"
}

@ebiggz
Copy link
Member

ebiggz commented Mar 11, 2025

I am going to merge this in as-is and refactor to <firebot-searchable-select> along with the other instances that need it 👍🏻

@ebiggz ebiggz merged commit 38bca68 into crowbartools:v5 Mar 11, 2025
1 check passed
@phroggster phroggster deleted the feat/3000 branch March 11, 2025 18:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants