Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Editor

Notices

Reply
 
Thread Tools Search this Thread
Old 04-20-2023, 10:32 AM   #1
Lghtnup
Junior Member
Lghtnup began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Apr 2023
Device: none
Name pronunciation

Is there a way to code, perhaps in Python, phonetic pronunciation into and epub file? I'm working on a book with a character named Sethe (Seth-uh), and Calibre's reader just spells out the word with no attempt to pronounce it. I had Read&Write read it and it worked correctly, is there anything that can be done to help it?
Lghtnup is offline   Reply With Quote
Old 04-20-2023, 10:46 AM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,866
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
The calibre viewer's TTS engine just passes the book text to yhe operating system. There is no facility for pronunciation guides.
kovidgoyal is offline   Reply With Quote
Advert
Old 04-21-2023, 01:10 AM   #3
nqk
Fanatic
nqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beauty
 
Posts: 516
Karma: 32106
Join Date: Feb 2012
Device: Onyx Boox Leaf
Quote:
Originally Posted by kovidgoyal View Post
The calibre viewer's TTS engine just passes the book text to yhe operating system. There is no facility for pronunciation guides.
I wonder if that is wrapped in <span lang="abc"> tag, will the engine read it the "right" way?
nqk is offline   Reply With Quote
Old 04-21-2023, 01:16 AM   #4
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,866
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
No the engine supports only plain text not HTML. Some of them support SSML, but its spotty and doesnt work well.
kovidgoyal is offline   Reply With Quote
Old 04-25-2023, 12:57 AM   #5
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 2,297
Karma: 12126329
Join Date: Jul 2012
Device: Kobo Forma, Nook
Quote:
Originally Posted by Lghtnup View Post
Is there a way to code, [...] phonetic pronunciation into and epub file?
See the discussion in:

There's 2 methods:
  • CSS Speech
  • SSML

but, like Kovid said, the support on actual devices is effectively nonexistent.

Quote:
Originally Posted by Lghtnup View Post
I'm working on a book with a character named Sethe (Seth-uh), and Calibre's reader just spells out the word with no attempt to pronounce it.
Within the past few years, there's been some work on more specialized tools for audiobook generation.

You can feed a list of words + pronunciations, then regenerate the final audio files... but it's more something at the Amazon/Microsoft/Google paid Text-to-Speech level.

I first found out about that in this podcast interview:

(He speaks about it ~20 mins in.)

But to have pronunciations you can mark up in your EPUB files and have it work well, in the current day... no.

Quote:
Originally Posted by nqk View Post
I wonder if that is wrapped in <span lang="abc"> tag, will the engine read it the "right" way?
Yes, some TTS engines already support multi-language markup. (Most won't though, but some do!)

And, by marking your HTML languages properly TODAY, there's already lots of other advantages too!

See my list of benefits:

and how to mark the HTML lang + xml:lang:

So if you used this HTML:

Code:
<p>“I eat tacos?”</p>
<p><span class="spanish" lang="es" xml:lang="es">“¿Como tacos?”</span></p>
The 1st "tacos" would be spoken in English.

The 2nd "tacos" would be spoken in Spanish.

Last edited by Tex2002ans; 04-25-2023 at 01:29 AM.
Tex2002ans is offline   Reply With Quote
Advert
Old 04-25-2023, 09:34 AM   #6
thiago.eec
Guru
thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.
 
Posts: 930
Karma: 1177583
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite
Quote:
Originally Posted by Tex2002ans View Post
You can feed a list of words + pronunciations, then regenerate the final audio files... but it's more something at the Amazon/Microsoft/Google paid Text-to-Speech level.
The android app '@Voice Aloud Reader' lets you add corrections to your TTS engine: you can expand abbreviations (e.g.: Mme -> Madame), prevent pauses on abbreviations with a period, and correct mispronounced words by providing a more 'phonetic' alternative. Over the time I've added a lot of these, and most of it is perfect now, with a few exceptions popping up once in a while, which is promptly corrected with a new entry.

Last edited by thiago.eec; 04-25-2023 at 09:44 AM. Reason: info about pauses
thiago.eec is online now   Reply With Quote
Old 04-25-2023, 04:47 PM   #7
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 2,297
Karma: 12126329
Join Date: Jul 2012
Device: Kobo Forma, Nook
Quote:
Originally Posted by thiago.eec View Post
The android app '@Voice Aloud Reader' lets you add corrections to your TTS engine: you can expand abbreviations [...] and correct mispronounced words by providing a more 'phonetic' alternative.
Thanks for that info.

Yeah, some readers may have a manual "pronunciation" override list too. I think that's a much better way to go compared to clogging up the code inside the books.

(I think TTS would be WAY better handled at the OS/reader/browser level instead of baked in—see that 2021 linked thread for some more specifics.)

- - -

Side Note: Even since that 2021 thread, there's been enormous quality jumps in Text-to-Speech generation.

A few new tools came out which are generational leaps above the stuff before.

The more data it can process, the better it can figure out context... automatically handling cases like "Madame" vs. "Mme." (Abbreviation) vs. "MME" (Acronym) better.

Speech-to-Text (SST) had huge jumps too.

Before, you needed a ton of training data just for a specific language... then you needed to repeat that for Languages B, C, and D... Each language was in its own silo.

Now, you mash them all together, and the network deduces patterns across nearby languages too.

(So while you're training better Spanish data... Portuguese and French and Italian are all going along for the accuracy ride too!)

SST is also auto-detecting Proper Nouns based on emphasis/speed of how the person is speaking + surrounding words. Even handling:
  • Unknown words
    • Book/Article titles
    • Last names
    • Company names
    • Usernames
  • + Strange/obscure terminology
    • Programming terms

... and spelling/capitalizing them perfectly.

- - -

Quote:
Originally Posted by thiago.eec View Post
Over the time I've added a lot of these, and most of it is perfect now, with a few exceptions popping up once in a while, which is promptly corrected with a new entry.
Wow, I looked at their site and it links to ~10 year old Android videos... lol. Is there any more recent screenshots and things showing off those specific options/functionality?
Tex2002ans is offline   Reply With Quote
Old 04-25-2023, 08:44 PM   #8
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
Quote:
Originally Posted by Tex2002ans View Post
Wow, I looked at their site and it links to ~10 year old Android videos... lol. Is there any more recent screenshots and things showing off those specific options/functionality?
I'd like to second @Voice Aloud Reader , I've been using it for years. It's easily the best TTS app I've used for listening to epubs. There's a free version so you can try it for yourself. The premium version has no ads. The developer was very responsive the only time I ever needed to ask for some advice.

As I recall, the pronunciation editing feature is supplied via also installing the FBReader TTS+ Plugin app (free).
jackie_w is offline   Reply With Quote
Old 04-25-2023, 10:40 PM   #9
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 2,297
Karma: 12126329
Join Date: Jul 2012
Device: Kobo Forma, Nook
Quote:
Originally Posted by jackie_w View Post
I'd like to second @Voice Aloud Reader , I've been using it for years. It's easily the best TTS app I've used for listening to epubs. [...]

As I recall, the pronunciation editing feature is supplied via also installing the FBReader TTS+ Plugin app (free).
Thanks for that info.

Would you be able to take a few screenshots showing off the latest menus? (Like the pronunciation editor, etc.)
Tex2002ans is offline   Reply With Quote
Old 04-26-2023, 09:48 AM   #10
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
Quote:
Originally Posted by Tex2002ans View Post
Would you be able to take a few screenshots showing off the latest menus? (Like the pronunciation editor, etc.)
This is a sequence of screenshots to demo changing pronunciation:
  1. VAR1.jpg: Open epub in @Voice Aloud Reader. Select word to have pronunciation changed by long-press which pops up the mini context menu bar.
  2. VAR2.jpg: Select the rightmost vertical-3-dot icon and select "Edit speech".
  3. VAR3.jpg: The selected word appears in the "Pattern" box and you type your chosen phonetic string in the "Replace" box, using the speaker icon until it sounds acceptable. From the top "Type" drop-down you can select 'Case Sensitive', 'Case Insensitive' or 'Regular Expression'.

    Under the [TEST] button you see your selected word within its original sentence to give some context.

  4. VAR4.jpg: The [TEST] button's drop-down lets you select 'Original', 'Replacement' or 'All replacements'. I chose 'All replacements' because there are also 2 more words (Khairan, Aljais) in that sentence where I had already changed the pronunciation. So now there are 3 words in the sentence where the original word is replaced with it's new phonetic sound. (Don't worry, the book's eyeball-reading text remains unchanged!).

    Toggle between 'Original' and 'All replacements' using the speaker icon to compare before & after pronunciation. [SAVE] button when happy.

  5. VAR5.jpg: The latest word replacement appears at the end of the list and can be selected/edited at any time.

Disclaimer: I have no idea how "Ammar ibn Khairan of Aljais" is supposed to be pronounced, I used it merely for illustrative purposes. The Ivona Amy voice I use may have had it correct without me needing to change anything.

A general comment on user interface, I don't think @VAR will win any designer award for beauty and style, but I have found it fairly straightforward to find what I need to get the job done. Then again, I am an old IT person (function beats style ).
Attached Thumbnails
Click image for larger version

Name:	VAR1.jpg
Views:	74
Size:	74.5 KB
ID:	201293   Click image for larger version

Name:	VAR2.jpg
Views:	88
Size:	71.4 KB
ID:	201294   Click image for larger version

Name:	VAR3.jpg
Views:	79
Size:	37.6 KB
ID:	201295   Click image for larger version

Name:	VAR4.jpg
Views:	76
Size:	37.8 KB
ID:	201296   Click image for larger version

Name:	VAR5.jpg
Views:	79
Size:	49.1 KB
ID:	201297  

Last edited by jackie_w; 04-26-2023 at 09:51 AM.
jackie_w is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Audio for pronunciation in dictionary nontrovoilnome Onyx Boox 1 11-04-2023 01:39 AM
Kindle should have a talking (pronunciation) dictionary Barty Amazon Kindle 7 08-29-2011 08:41 PM
Pronunciation of foreign/unusual names in books Ea Reading Recommendations 28 05-12-2011 02:47 PM
Pronunciation? bjones6416 Calibre 6 10-27-2010 05:36 AM


All times are GMT -4. The time now is 05:32 PM.


MobileRead.com is a privately owned, operated and funded community.