TTSensei web app: listening to randomized context sentences

Hey all! I made an app that I’d like to share in case others find it useful.

I’ve been thinking of a way that would make context sentences more useful to me and came up with this simple exercise:

  • listen to TTS narrated context sentence without knowing which particular vocabulary it uses (but only use the vocab that you learned);
  • try to get the meaning, or at least to spot the familiar vocab;
  • then check your guess by looking at the written and/or translated version of the same sentence.

All that, I have implemented in this simple web app: TTSensei (source code: GitHub - SiLiKhon/TTSensei ). It’s likely buggy, but should be usable.

I’d love to hear feedback, improvement suggestions, or just whether this thing is useful at all.

4 Likes

Here’s a short tutorial to get started with the app.

Setup

  1. Generate WaniKani API token with all_data:read access. Paste it into the corresponding field in the settings tab of the app (“Settings” button in the top right). This will be used later on to collect all the vocabulary and kana vocabulary items for which your SRS stage is above 0.
  2. Generate TTS API token at apiKeyの取得 (for more info, see WEB版VOICEVOX API(高速) ). Paste into the corresponding field in the settings tab of the app. This will be used to voice the context sentences for the collected vocabulary when clicking the “►” button.
  3. Click “Collect Vocab & Sentences.” Optionally, you can filter by levels from which you would like the vocabulary to be taken.

This info will be stored in your browser cache, so normally you wouldn’t need to repeat these steps. You may want to collect more vocabulary and/or impose level filters (by repeating step 3 above) as you progress in WaniKani.

Usage

After the setup is done, the left panel should be filled with context sentences to pick from. Once you click on the “Get Random Sentence” button, a random sentence will be loaded, though its content will be hidden behind spoilers. You can uncover these spoilers by clicking on them. The intention is to be able to listen to the phrase (as narrated by TTS when clicking the “►” button) before you read it.

I guess the workflow would depend on your skill level a lot. For someone like myself, who is just starting to learn, I intended something like this:

  1. Get random sentence and listen to it (“►” button). Try to pick the familiar phrases from the sentence, even if you can’t get the entire wording.
  2. Check yourself by uncovering the top spoiler (vocabulary word/phrase). Listen again to cross-check that you do hear the vocabulary phrase in the narrated sentence.
  3. Uncover the middle spoiler (sentence written in Japanese). See if you can pick up more meaning and familiar words here. Do listen to the voice again - are you making more sense of it now?
  4. Finally, uncover the bottom spoiler to check the translation.

Hope this helps :slight_smile:

5 Likes

I made a tiny, yet hopefully useful update, by adding a link to duck.ai (anonymized chatbot) so that it makes the grammatical breakdown of the current sentence (screenshots below).

This helps me a lot at my current level, although I have no idea how trustworthy these explanations are :slight_smile:

1 Like

hey! just found this and it looks awesome. One thing I’m not sure about is the source of the sentences - are they fetched from WK examples? If so, could you add a link to the item that features the examples (also maybe link to kanjis/vocabulary)?

2 Likes

Hi! Glad to hear you like the app :slight_smile:

Yes, these are fetched from WK examples to vocab entries. Hmm, lemme check, link to the corresponding WK vocab page should be easy to add, I think…

2 Likes

ok done! there should now appear this link below the first line:

2 Likes

Briliant! thank you so much! :heart_eyes::heart_eyes::heart_eyes::heart_eyes::heart_eyes:

2 Likes

I love it! Thank you! Wish I could add these to my synced Wanikani Anki Deck

2 Likes

Thank you for this. Let me try today.

1 Like

I got failed to fetch error. I put only L1 to fetch to begin.

1 Like

Thank you!

I think it’s totally doable, though it’ll probably use up tts api quota quite quickly - maybe worth just doing it once and then sharing generated audio files in an archive.

That said, I did notice some incorrect audio renditions (even though I’m quite a beginner in Japanese). Maybe community help would be useful to filter those out :slight_smile:

Thank you for trying and for the feedback. Could you pls provide more info (browser version, developer console logs, etc)? So far, I couldn’t reproduce - for me it works even from a clean incognito session…

I used my Android phone, Chrome.
Also in my laptop, Chrome Version 144.0.7559.133 (Official Build) (64-bit).
Same result.
I tried to generate new token just for TTSensei, same result.

1 Like

Hmm, still, works for me with chrome…

Would it be appropriate for me to debug using your WK api key (e.g., you could create one temporarily with read-only access)? My assumption is that since your level is much higher than mine, there’s much more content that the app is trying to fetch and there is some bug in my code only occurring in such case.

I’m traveling atm but will have some time to debug tomorrow or over the weekend.

NB: even when you filter with lvl 1 alone, the app first fetches all assignments and then filters by level: TTSensei/script.js at 4ef9fe415d0b3e6ee898506eaabbcc47da9fee90 · SiLiKhon/TTSensei · GitHub

1 Like

Sure. Send me your email or details to mailto:winanci@gmail.com. I will send my read-only token.

1 Like

thanks :folded_hands:

emailed you just now

ok I manage to reproduce the error with your key, so that’s good!

I’ll do my best to fix it within the next few days

1 Like

OK I think I managed to fix it, so it should work even when fetching all 60 levels at once. Additionally, the level filter is now applied within the WaniKani API query itself, so fetching single or a few levels at a time should be real quick.

Please let me know if the app works for you now :slight_smile:

1 Like

Ok, will try tomorrow. Thank you.

1 Like

Ok, i just tested it. It’s working perfectly. Thank you.

1 Like