Vocab-Apps / anki-hyper-tts

HyperTTS Addon for Anki
GNU General Public License v3.0
76 stars 10 forks source link

Presets not accessible after upgrade (due to major change in add-on) #157

Open Danika-Dakika opened 8 months ago

Danika-Dakika commented 8 months ago

I just upgraded to AnkiDesktop 23.12.1 and HyperTTS v1.08. I've been using HyperTTS for over a year with no problems. I have 9 presets for various fields.

Since the upgrade, I can see the TTS buttons in the Editing bar, but there's no drop-down to choose a preset -- image

When I click the buttons, I get a warning that I have no presets -- image

But my presets are in the HyperTTS menu, and available to open/duplicate in the Settings, and in the Config file -- image image image

I've enabled/disabled, and restarted several times (all in combination with each other). I've disabled all other add-ons, so that HyperTTS is the only one running. Still nothing. What do I need to do to get this working?

Danika-Dakika commented 8 months ago

Possibly related to this in Anki 23.12.1: https://forums.ankiweb.net/t/changes-in-add-on-config-made-through-anki-not-reflected-in-config-json/40812 -- however there may still be a HyperTTS-specific issue, because the rest of my add-ons are using the options selected in Tools > Add-ons > Config, even if the config.json is different.

Not the issue

Danika-Dakika commented 8 months ago

I believe I've figured out the problem. This is because of the big change released in October 2023 -- https://languagetools.anki.study/updates . The toolbar changed, and now setting up presets is not enough, I also need to associate them with a specific note type and/or deck. I'm quite surprised that such a huge change was put out without any alert to the user. If I hadn't dug through the changenotes, I wouldn't have had any way of knowing.

As to the change itself --

  1. I have 9 presets that I use with 5 note types, so I had to click [Add Rule > Existing Preset > drop-down > select one > Ok > Note Type] dozens of times to set this up. This interface should be a lot easier to work with.
  2. My cards are distributed throughout 9 sub/sibling decks, and there is no option to select the appropriate deck, so I couldn't choose the parent deck (which would have saved me most of those clicks).
  3. I can't choose a single preset that I need to generate audio for without opening a dialog. Being able to apply audio from the editing toolbar was one of the main improvements between Awesome and Hyper -- and one of the features I've touted to encourage folks to switch. Removing that is a big step backwards.
  4. Clicking the Add Audio button on the toolbar isn't an option for me, because out of my 8 presets, only the first one is guaranteed to be filled. As soon as the feature reaches a field that doesn't have text, it fails instead of continuing to the next potential field. image
luc-vocab commented 8 months ago

Yes this is a major change and has been a bit confusing for some people. Certainly compared to AwesomeTTS , the UI is much more complex. But first let me ask you an important question: do you aspire to having full automation, i.e. being able to automatically and accurately generate all sound files with a single click, based on the note type and/or deck ?

If your answer is yes, then you'll agree we need a way to teach HyperTTS what preset is appropriate in what circumstance. And that's what this "Preset Mapping Rules" dialog was meant to achieve.

Additionally, with potentially 9 presets that apply to a note, do you not welcome the ability to apply them all in one operation ? (granted it looks like this is problematic right now as per point 4 but potentially fixable).

trying to answer your individual points:

  1. understood but this is a one-time setup. how do the 5 note types map to each 9 preset ?
  2. is "note type" only mapping appropriate in that case ? If you have several decks which share the exact same structure, then targeting the note type helps you apply one preset to those multiple decks.
  3. the philosophy behind this feature is that you would only add the presets which make sense for this particular note type and/or deck, and a single click of the "apply audio" button would automatically do the right thing. It's still possible to manually pick the preset, by going to the "preset mapping rules" dialog (gear icon), then clicking "run" on the appropriate rule. If you had things setup perfectly, then you'd have your audio with a single click (and possibly with 0 clicks in the future if I add audio generation as you type). If you wanted to manually choose, it would be 3 clicks (gear icon, click "run", close dialog) compared to 2 clicks before.
  4. maybe you can elaborate on your use case: are all 8 presets applicable to the current note type ? If so, I could conceivably make it so that this error is ignored and all presets get processed. But first I'd like to make sure that those 8 presets do apply and you sometimes do run them on this note type/ deck combination ?
Danika-Dakika commented 8 months ago

I appreciate that you are giving these ideas some thought!

As to the big question -- I'll say yes, but only sometimes. For a brand-new note, one-click would be great -- as long as it has some error handling to get over the blank source fields. But a lot of the editing I do is adding one more sentence (or synonym) to an already existing note. On those, I don't need (or want) it to go through every field, I just need one or two. For anyone who is improving and refining their notes over time, I think that would be the case.

  1. I did the work a long time ago to bring the note types closer together so that I could use one common set of field names -- so the source-text and target-audio fields across all the note types have the same names. That's how I was able to get by with relatively few presets under the old system -- no matter the note type, "First Exs" always maps to "1st Audio," etc. [Sorry about the typo, it's actually 8 presets as I said later. The 9th one is rarely used.]

  2. I had to use the "note type" mapping. But because I have common field names, and all the cards are under a common parent deck, I could have taken advantage of a "deck and note type" option that allowed me to choose the parent deck (and also applied to the subdecks). An option for "deck" alone (as long as I was able to choose the deck) would have been even easier -- but I understand that might make me an outlier.

  3. a. It was often 3 clicks for me before too (drop-down > select one > Add Audio)! But they were closely clustered clicks on a clean interface. The dialog takes just a bit longer to open, then I have to roll halfway across the screen to get to run buttons and find a preset name which is lost in a field of other things [picture] (most of which are releated to the one-time setup and I won't need again). image b. On top of all that, I'm trapped there until I'm done clicking whichever ones I need one-at-a-time and waiting for them to process. I can't do anything else in the Browse window -- like scrolling down my note to make sure of which fields I need to run, editing my source field when the pronunciation reveals there's a typo, editing my source field so I can record audio for multiple parts of the field (without the TTS reading the separating punctuation, superscript notations, etc.), deleting the 1st and 2nd audio I generated because those voices didn't sound quite right, etc. These are really common things I do, and now I have to bounce in and out of the dialog box to do them.

  4. If I could use that all-in-one-click feature, it would be on a new note (of any of my note types). I will always need audio for the main word, but the note can have up to 3 synonyms and up to 4 sentences that also need audio -- for a total of 8 presets. There's no order I can put the presets in that would make sure the blank fields are always at the end, because the number of synonyms and sentences is flexible (and it's not clear what order they are being generated in anyway). Ideally, it would fail gracefully on those blank fields, simply displaying a "Skipped" message instead of the "Generating Audio for" message, and moving on.

Again, I am thankful for the chance to discuss these things with you. Let me know if there are any other ways I can help!