Rendered at 20:23:46 GMT+0000 (Coordinated Universal Time) with Cloudflare Workers.
smoores 1 days ago [-]
I took a week of from work recently to reimplement Storyteller's forced alignment algorithm. Storyteller[1] is an open source, self hosted platform for creating, managing, and reading/listening to "readaloud" books — books that have audiobook narration built in and can highlight each sentence (and/or word, with this new algorithm!) as it's read aloud. Forced alignment is the process of determining where each piece of text starts and ends in the audiobook.
Anyway, I am really pleased with how the new algorithm turned out! Hopefully someone else finds it interesting as well.
Wow I didn't even think about just using on device AI.
I'm going to set this one up and try it with kokoro which has the most natural for small size that I've seen. Wonder if the paperwhite 12th Gen can handle it.
And also setup the main repo for when I have the real audio book. Thanks!
leobg 1 days ago [-]
I tried running Kokoro on my iPhone XS (several years old), and it was slower than real-time. So, i wouldn’t expect it to be usable on a Kindle. But if you find a solution, please let me know.
My phone went from slightly slower than realtime to very comfortable (also lower latency on first utterance!)
orsenthil 1 days ago [-]
This is excellent! I wanted this. I had noticed that Kindle had limited feature like this for certain books that support audiobooks. I had tried this style of reading with audiobook and ebook without a any automated sync, but hadn't pursued it. This looks cool. :)
smoores 1 days ago [-]
Thanks! We're improving it all the time — we're working on big new releases ("v3") for the web app and mobile apps. There's a Discord server linked in the docs if you ever need any help out want to chat!
neves 20 hours ago [-]
In Kindle you must pay for the ebook and audiobook to make it work
zackify 21 hours ago [-]
Any plans to offer a way to generate audio books on demand. like if i set kokoro, a book auto imports, it can make the file for me for the whole book after some time of local gpu work?
cainxinth 1 days ago [-]
This is how I proofread. I play a screen reader while I read my work. The brain does some autocorrecting that you don’t even notice and occasionally skips over a typo when you read it without the audio.
mobeets 1 days ago [-]
This is really impressive! One thing I’ve often wanted is a way to listen to an ebook (say, while cooking), and then later be able to sit down and read from where I left off. This essentially requires the same functionality that Storyteller offers (syncing progress through an ebook and audiobook), though arguably overkill for this use case (since I could handle a more coarse alignment). In any case, is this something Storyteller would be good for? Or are there other tools for the job?
smoores 1 days ago [-]
That is actually the exact use case that I originally built Storyteller for! I wanted to listen to my books on long runs, and then switch to reading when I got back.
The Storyteller mobile apps have great support for this, I think. They have fully fledged audiobook players and ebook readers, and you can switch between the two with one tap. And then of course you can also double tap on a sentence and start playing from there, with the app highlighting the currently read sentence.
Xerox9213 1 days ago [-]
What about reading on a koreader? Is bookbridge still the best bet?
Storyteller works great for this. It even syncs your position across devices. So when I really want to settle in to read, I go ahead and switch from my iPhone where I was listening to my Boox e-ink reader which syncs right to where I left off.
thelisu 1 days ago [-]
This highlights the core reason why I don't like audiobooks, podcasts, or even movies, compared to reading: it's too slow. Looking at the example, I read two or three times as fast as the audio goes.
What I would need is the opposite: some eye-tracking software that plays the audio at the point I am reading. I don't know if it would be any useful though, as it would be very sped-up, but maybe it would increase "immersion" nevertheless.
smoores 1 days ago [-]
Almost everyone who uses the readaloud features in Storyteller speeds up the audio playback quite a bit, often 2-3x, so that it matches their reading speed better. The Storyteller apps let you set different playback speeds for pure audio playback vs readaloud, since being able to see the text usually makes it easier to listen faster!
I supposed I should add: it's also, obviously, fine if this just isn't for you! Lots of people get a lot of value out of audiobooks (e.g., I really like to listen to audiobooks in the car or while running), but like to switch to reading when it's an option. And lots of people find readaloud super valuable, whether because they have a print disability or neurodivergence that makes reading challenging, or just because they like the experience of being read to. But lots of people are in neither of those groups!
ek_erilaz 1 days ago [-]
I'd never considered such a tool before today, but the example sparked the exact same idea for me, as if it were the most obvious next step to invert the causal direction and externalize the inner reading voice (instead of trying to force the internal reading to follow the external audio). I'm not sure that it would improve reading comprehension or make the experience better in some ineffable way, but it would be really interesting to try it out. Questions arise:
- Would it help with reading comprehension? Speed? Enjoyment?
- If the audio was your own synthesized voice, would that help comprehension and immersion?
- If the audio was in a voice very different from your own, and you used this system for several hours a day, would it change your natural inner reading voice, or even some other aspect of your self-perception? I don't believe I've experienced Such a tight coupling between thoughts driving external responses before; I didn't expect to do so until real-time brain scanning got a lot better than current SotA.
- While reading, I frequently speed along and then jump back a word, sentence, or paragraph to slowly review it. In this system, the audio would slow down as I read back through more slowly, almost sounding out words along with me. I just read a book filled with the names of obscure french villages, and I couldn't just ignore them - instead bogged down in sounding them out and trying to guess how to pronounce them. Having a system sounding them out with/for me would have been awesome. This assumes the system is good at pronouncing things in various languages (mostly solved problem), and picking sane defaults when pronunciation conflicts arise (mostly unsolved?). In those cases, how hard would inferring be? Google translate is pretty good at generating localized pronunciations, but TTS systems struggle.
- Specifically for non-technical reading, it would be interesting to try having a very low level of ambient noise backgrounding the speech, driven by an LLM analyzing the text for obvious cues. Tavern sounds, rushing of wind in the mountains, crackling campfire, or even music generation (creepy dungeon etc etc)... When you pause reading for a moment to look away from the book, the speech obviously stops - but the tavern sounds continue. Might help people 'lock in' who normally get distracted from whatever they're reading.
altmanaltman 1 days ago [-]
I read very fast and I noticed that after a certain point, it helps to not have the inner voice. Instead its more like I see a bunch of text and I understand it instead of going word by word. I don't think its possible to do this with audio.
SamBam 23 hours ago [-]
I'm curious whether individual-word highlighting is best for people with reading disabilities, or a broad, whole-sentence highlighting might actually be preferable.
When I'm reading my eye is jumping back and forth across the sentence. The demo made this abundantly clear -- it was actually very hard to just track the highlighted word.
Just using the fact that I consider myself a very good reader as an example, I wonder whether there are advantages to the eye being free to skip back and forth across a sentence.
I assume it might be as simple as a user-preference toggle, since you're already highlighting the sentence.
You could also try UIs where the highlighting was more "spread out," focused on the word being said but bleeding into the other words on either side (maybe up until the hard stop of the sentence boundary) to lead the eye toward it. I'm imagining something like the red-blue text color of the BeeLine editor.
smoores 23 hours ago [-]
My guess is, like many accessibility tools, it will vary by person! The Storyteller apps don't actually support this multi-level granularity demostrated in the demo here — until this iteration of the alignment algorithm, the timing wasn't good enough for word-level highlighting. So currently we only do sentence-level highlighting.
When we do roll out multi-level granularity, it will indeed be something that you can configure yourself, including how each level is indicated (e.g., you might want to set a background color on the sentence and underling the word) and whether a each level is indicated at all!
The "spread out" highlighting is a really neat idea, I don't think I've heard that suggestion before!
justinhunt 19 hours ago [-]
This is very interesting. I do something related: matching student oral reading transcripts back against the text they were assigned to read.Students will misread then re-read a sentence, skip sentences, skip paragraphs etc.
I think its similar because we both seek to assign audio time stamps to sentences and words.
But I wonder why your forced alignment algorithm is so heavy duty. (My head started to spin at CTC emissions. ) Probably yours is just way more thorough than mine,
My simplistic approach would have been to transcribe the audio. And then run a differencing script chapter by chapter matching the book text with the audio transcript. And then do something similar intra chapter to get sentence and word level time stamps.
smoores 19 hours ago [-]
Oh, cool! Yeah that seems like a good application.
The current Storyteller alignment algorithm actually does do just that! We use Whisper to transcribe the audio to text, and then use error-align[1] to align on the text.
There are a few disadvantages to this approach:
1. Whisper only supports ~25 languages, and only about 10 of those very well. We want to support more languages, and Massively Multilingual Speech supports "1000+"
2. Whisper's timing outputs are not very good. We want to do word-level highlighting, like in the demo at the top of the post, but in order for that to be a good user experience, those timings need to be very precise. Much easier to do that with CTC!
CTC Viterbi is the tried and true forced alignment algorithm for good reason. It's not really that it's heavier duty than running Whisper and aligning on the output. Rather, it's like you stop Whisper early, before it does the final step of actually producing text, and step in and say: take the data you just calculated and use it to produce _this_ text, specifically. And then, since it produced _your_ text, you don't have to do anything else, you just use the timestamps directly.
The only reason Storyteller never used it in the past is because I couldn't come up with a good way to do the boundary search I describe in this post! This is super important for books in a way that it may not be for your oral reading transcript use case, because chapters can be (and often are) out of order between the ebook and audiobook. But once I worked out the n-gram RANSAC approach, it became much more tenable.
Thanks for the reply and explanation. It is very helpful. Our app is old, started well prior to whisper. But we have updated it regularly as useful tech came along. I will check out CTC Viterbi and error-align !
jimmySixDOF 11 hours ago [-]
slightly tangential but the podcast app Snipd has a lot of text to speach re-sync alignment to recover from inserted advertisements so it might be worth exploring if they have published any details
fwip 19 hours ago [-]
Have you looked at existing genomic alignment algorithms? I'd be surprised if Needleman-Wunsch didn't fit your needs.
smoores 18 hours ago [-]
Viterbi and Needleman-Wunsch are essentially the same algorithm, developed in parallel for two different domains! The Viterbi formulation of the algorithm is the one usually applied to signal decoding, since that's what it was originally designed for.
fwip 18 hours ago [-]
Oh cool, thanks for explaining to me!
nottorp 1 days ago [-]
I thought reading becomes immersive if you like the book...
smoores 1 days ago [-]
Sure! Some people have print disabilities like dyslexia and neurodivergence that makes reading text for an entire novel-length book challenging. Other people are perfectly competent print readers, but find that they enjoy having their book read to them. Audiobooks are their own art form, and it's nice to be able to enjoy them alongside text.
"Immersive reading" seems to be the industry term for this feature — I used it here because I though it was most likely to be recognized by a wide audience. Personally, and within the Storyteller ecosystem, I call it "readaloud," which I think is at least a little bit more useful of a phrase.
orphereus 23 hours ago [-]
What is the purpose of this outside people with disabilities? Why do you need word highlighting, it's like those TikToks and IG reels where they show one word at a time to keep you hooked.
Surely, if you need this to read a book (again, besides any disabilities), you should stop your current habits.
smoores 23 hours ago [-]
Well, first of all, lots of people specifically do use this because they have print disabilities or neurodivergence that makes it challenging to read long stretches of text.
Also, disability isn't binary? Some people have an easier time reading text than others — is your argument that books should remain less accessible to those people for whom it's harder because you don't personally feel like they should need it?
And then there are _lots_ of people that just enjoy reading this way. Audiobook production is its own art form, and many people like experiencing the text and the audio together. For some people it helps them focus in a noisy environment, for some people they find they can read faster with the narration, and some people just enjoy it.
Every single time I post about Storyteller, there are multiple people in the comments insisting that this shouldn't exist because no one should ever consume books differently from how they do. I don't understand it, honestly. If you don't want to read books this way, that's totally fine! You can even still use Storyteller — it works great with plain EPUBs. Why the need to make others feel bad for the way they engage with stories? The world is a better place if more people read more books — discouraging people from reading books in the way that feels pleasant and accessible to them makes the world worse.
I think if you feel compelled to instruct people you don't know to "stop their current habits" because you don't personally understand their needs or wants, perhaps you should reconsider your current habits, yourself.
yorwba 21 hours ago [-]
It's helpful for learning a foreign language to read a text while simultaneously listening to it. But when you're not very good at the language yet, you'll likely often fall behind. Word highlighting makes it easy to get back on track. I assume people just learning to read their first language would similarly benefit.
tcoff91 21 hours ago [-]
Even if you don't use the immersive reading feature, it's really nice to be able to switch back & forth from reading to listening. It's nice to be able to start reading right from the sentence where you left off listening to the audiobook. Storyteller is a great e-reader and audiobook player regardless of if you use the immersive reading.
Also, it's just fun to have the audio narration as you read. I typically set the speed to like 2.5x when doing readaloud.
usern20260720 1 days ago [-]
I generated an immersive reading for Athenaze in a few afternoons with Claude
smoores 1 days ago [-]
... Okay!
lstodd 1 days ago [-]
If that's about reading why do I need to zoom to 140 in FF to just begin reading?
smoores 1 days ago [-]
Hm, I don't know what you're referring to. Is the text too small for you? I wrote the blog post on FF for Linux and FF for Android, and I didn't need to zoom in to review it, though some of the graphics do definitely end up with pretty small text on mobile.
lstodd 23 hours ago [-]
xubuntu, 2x iiyama IVM610F those are 24" 1920x1200, firefox latest.
For some reason when I open hn it's readable. When I open your site it's.. not.
smoores 23 hours ago [-]
You gotta give me more than that haha. It's not readable in what way?
lstodd 22 hours ago [-]
Okay.
It is a small font within a small column which wastes like 60+% space of a screen, and I use tabs, eh? Tabs are not windows, I will not resize my browser just because of one single tab.
This is a horizontal 24" 1920x1200, not a fucking phone.
so I respectfully plead for you and everyone else to forget those ridiculous horizontal margins.
Anyway, I am really pleased with how the new algorithm turned out! Hopefully someone else finds it interesting as well.
[1] https://storyteller-platform.dev
I couldn't find it exactly in the docs. Sorry if I missed it.
If you align these and then pull onto koreader via opds or other way, will audio work over Bluetooth there too? Along with the highlighting.
I'm going to set this one up and try it with kokoro which has the most natural for small size that I've seen. Wonder if the paperwhite 12th Gen can handle it.
And also setup the main repo for when I have the real audio book. Thanks!
My phone went from slightly slower than realtime to very comfortable (also lower latency on first utterance!)
The Storyteller mobile apps have great support for this, I think. They have fully fledged audiobook players and ebook readers, and you can switch between the two with one tap. And then of course you can also double tap on a sentence and start playing from there, with the app highlighting the currently read sentence.
1. StorytellerSync (https://github.com/Sirozha1337/storytellersync.koplugin), which syncs your KOReader progress directly to your Storyteller server
2. Audiobook (https://github.com/stradichenko/audiobook.koplugin), which has a WIP media overlay implementation that works with Storyteller readalouds
What I would need is the opposite: some eye-tracking software that plays the audio at the point I am reading. I don't know if it would be any useful though, as it would be very sped-up, but maybe it would increase "immersion" nevertheless.
I supposed I should add: it's also, obviously, fine if this just isn't for you! Lots of people get a lot of value out of audiobooks (e.g., I really like to listen to audiobooks in the car or while running), but like to switch to reading when it's an option. And lots of people find readaloud super valuable, whether because they have a print disability or neurodivergence that makes reading challenging, or just because they like the experience of being read to. But lots of people are in neither of those groups!
- Would it help with reading comprehension? Speed? Enjoyment?
- If the audio was your own synthesized voice, would that help comprehension and immersion?
- If the audio was in a voice very different from your own, and you used this system for several hours a day, would it change your natural inner reading voice, or even some other aspect of your self-perception? I don't believe I've experienced Such a tight coupling between thoughts driving external responses before; I didn't expect to do so until real-time brain scanning got a lot better than current SotA.
- While reading, I frequently speed along and then jump back a word, sentence, or paragraph to slowly review it. In this system, the audio would slow down as I read back through more slowly, almost sounding out words along with me. I just read a book filled with the names of obscure french villages, and I couldn't just ignore them - instead bogged down in sounding them out and trying to guess how to pronounce them. Having a system sounding them out with/for me would have been awesome. This assumes the system is good at pronouncing things in various languages (mostly solved problem), and picking sane defaults when pronunciation conflicts arise (mostly unsolved?). In those cases, how hard would inferring be? Google translate is pretty good at generating localized pronunciations, but TTS systems struggle.
- Specifically for non-technical reading, it would be interesting to try having a very low level of ambient noise backgrounding the speech, driven by an LLM analyzing the text for obvious cues. Tavern sounds, rushing of wind in the mountains, crackling campfire, or even music generation (creepy dungeon etc etc)... When you pause reading for a moment to look away from the book, the speech obviously stops - but the tavern sounds continue. Might help people 'lock in' who normally get distracted from whatever they're reading.
When I'm reading my eye is jumping back and forth across the sentence. The demo made this abundantly clear -- it was actually very hard to just track the highlighted word.
Just using the fact that I consider myself a very good reader as an example, I wonder whether there are advantages to the eye being free to skip back and forth across a sentence.
I assume it might be as simple as a user-preference toggle, since you're already highlighting the sentence.
You could also try UIs where the highlighting was more "spread out," focused on the word being said but bleeding into the other words on either side (maybe up until the hard stop of the sentence boundary) to lead the eye toward it. I'm imagining something like the red-blue text color of the BeeLine editor.
When we do roll out multi-level granularity, it will indeed be something that you can configure yourself, including how each level is indicated (e.g., you might want to set a background color on the sentence and underling the word) and whether a each level is indicated at all!
The "spread out" highlighting is a really neat idea, I don't think I've heard that suggestion before!
I think its similar because we both seek to assign audio time stamps to sentences and words.
But I wonder why your forced alignment algorithm is so heavy duty. (My head started to spin at CTC emissions. ) Probably yours is just way more thorough than mine,
My simplistic approach would have been to transcribe the audio. And then run a differencing script chapter by chapter matching the book text with the audio transcript. And then do something similar intra chapter to get sentence and word level time stamps.
The current Storyteller alignment algorithm actually does do just that! We use Whisper to transcribe the audio to text, and then use error-align[1] to align on the text.
There are a few disadvantages to this approach:
1. Whisper only supports ~25 languages, and only about 10 of those very well. We want to support more languages, and Massively Multilingual Speech supports "1000+" 2. Whisper's timing outputs are not very good. We want to do word-level highlighting, like in the demo at the top of the post, but in order for that to be a good user experience, those timings need to be very precise. Much easier to do that with CTC!
CTC Viterbi is the tried and true forced alignment algorithm for good reason. It's not really that it's heavier duty than running Whisper and aligning on the output. Rather, it's like you stop Whisper early, before it does the final step of actually producing text, and step in and say: take the data you just calculated and use it to produce _this_ text, specifically. And then, since it produced _your_ text, you don't have to do anything else, you just use the timestamps directly.
The only reason Storyteller never used it in the past is because I couldn't come up with a good way to do the boundary search I describe in this post! This is super important for books in a way that it may not be for your oral reading transcript use case, because chapters can be (and often are) out of order between the ebook and audiobook. But once I worked out the n-gram RANSAC approach, it became much more tenable.
[1]: https://github.com/corticph/error-align
"Immersive reading" seems to be the industry term for this feature — I used it here because I though it was most likely to be recognized by a wide audience. Personally, and within the Storyteller ecosystem, I call it "readaloud," which I think is at least a little bit more useful of a phrase.
Surely, if you need this to read a book (again, besides any disabilities), you should stop your current habits.
Also, disability isn't binary? Some people have an easier time reading text than others — is your argument that books should remain less accessible to those people for whom it's harder because you don't personally feel like they should need it?
And then there are _lots_ of people that just enjoy reading this way. Audiobook production is its own art form, and many people like experiencing the text and the audio together. For some people it helps them focus in a noisy environment, for some people they find they can read faster with the narration, and some people just enjoy it.
Every single time I post about Storyteller, there are multiple people in the comments insisting that this shouldn't exist because no one should ever consume books differently from how they do. I don't understand it, honestly. If you don't want to read books this way, that's totally fine! You can even still use Storyteller — it works great with plain EPUBs. Why the need to make others feel bad for the way they engage with stories? The world is a better place if more people read more books — discouraging people from reading books in the way that feels pleasant and accessible to them makes the world worse.
I think if you feel compelled to instruct people you don't know to "stop their current habits" because you don't personally understand their needs or wants, perhaps you should reconsider your current habits, yourself.
Also, it's just fun to have the audio narration as you read. I typically set the speed to like 2.5x when doing readaloud.
For some reason when I open hn it's readable. When I open your site it's.. not.
It is a small font within a small column which wastes like 60+% space of a screen, and I use tabs, eh? Tabs are not windows, I will not resize my browser just because of one single tab.
This is a horizontal 24" 1920x1200, not a fucking phone.
so I respectfully plead for you and everyone else to forget those ridiculous horizontal margins.