-
Notifications
You must be signed in to change notification settings - Fork 34
Added Model Selection for Elevenlabs _ Added Voice Styles for Elevenlabs, Azure, and OpenAI. Minor UI bugfixes #263
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
Open
mitcheb0219
wants to merge
8
commits into
karashiiro:main
Choose a base branch
from
mitcheb0219:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
fdd6fc3
Several Backend Enhancements
mitcheb0219 c5f697e
Merge branch 'karashiiro:main' into main
mitcheb0219 45aa1b6
System Backend Update
mitcheb0219 ca44634
Merge branch 'main' of https://github.com/mitcheb0219/TextToTalk_Voic…
mitcheb0219 f5526ab
Adjustments made per comments on active PR
mitcheb0219 507fdac
Fixed up voice preset logic on backends
mitcheb0219 eeab659
Update SystemSoundQueue.cs
mitcheb0219 9df42cd
Merge branch 'main' into main
mitcheb0219 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,63 @@ | ||
| using Dalamud.Bindings.ImGui; | ||
| using System.Linq; | ||
| using TextToTalk; | ||
| using TextToTalk.Backends; | ||
| using TextToTalk.Backends.Azure; | ||
| using TextToTalk.UI.Windows; | ||
| using static TextToTalk.Backends.Azure.AzureClient; | ||
|
|
||
| public class AzureVoiceStyles : IVoiceStylesWindow | ||
| { | ||
| private readonly AzureBackend backend; | ||
| private PluginConfiguration config; | ||
| private VoiceStyles voiceStyles; | ||
| static double lastCopyTime = -1.0; | ||
| static string lastCopiedStyle = ""; | ||
|
|
||
| public AzureVoiceStyles(AzureBackend backend, PluginConfiguration config, VoiceStyles voiceStyles) | ||
| { | ||
| this.backend = backend; | ||
| this.config = config; | ||
| this.voiceStyles = voiceStyles; | ||
|
|
||
| } | ||
|
|
||
| public void Draw(IConfigUIDelegates helpers) | ||
| { | ||
| var currentVoicePreset = this.config.GetCurrentVoicePreset<AzureVoicePreset>(); | ||
| var voiceDetails = this.backend.voices | ||
| .OrderBy(v => v.Name) | ||
| .FirstOrDefault(v => v?.Name == currentVoicePreset?.VoiceName); | ||
|
|
||
| if (voiceDetails?.Styles == null || voiceDetails.Styles.Count == 0) | ||
| { | ||
| ImGui.TextDisabled("No styles available for this voice."); | ||
| return; | ||
| } | ||
|
|
||
| ImGui.Text("Click a style to copy its tag to clipboard:"); | ||
| ImGui.Separator(); | ||
|
|
||
| foreach (var style in voiceDetails.Styles) | ||
| { | ||
| if (string.IsNullOrEmpty(style)) continue; | ||
|
|
||
| if (ImGui.Selectable(style)) | ||
| { | ||
| VoiceStyles.Instance?.CopyStyleToClipboard(style); | ||
| lastCopyTime = ImGui.GetTime(); | ||
| lastCopiedStyle = style; | ||
| } | ||
|
|
||
| if (lastCopiedStyle == style && (ImGui.GetTime() - lastCopyTime < 1.0)) | ||
| { | ||
| ImGui.SetTooltip("Copied!"); | ||
| } | ||
| else if (ImGui.IsItemHovered()) | ||
| { | ||
| ImGui.SetTooltip($"Click to copy"); | ||
| } | ||
|
|
||
| } | ||
| } | ||
| } |
karashiiro marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.