View Single Post
Old 03-05-2017, 11:30 AM   #34
PoP
 curly᷂͓̫̙᷊̥̮̾ͯͤͭͬͦͨ ʎʌɹnɔ
PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.
 
PoP's Avatar
 
Posts: 3,018
Karma: 50506927
Join Date: Dec 2010
Location: ♁ ᴺ₄₅°₃₀' ᵂ₇₃°₃₇' ±₆₀"
Device: K3₃.₄.₃ PW3&4₅.₁₃.₃
-m

Reading eSpeak documentation, I found the -m switch which causes eSpeak to interpret some SSML tags when reading an htlm file.

I was interested in the xml:lang tag to have the speech synthetizer switching languages according to the markup. Perhaps integrating eSpeak to Koreader that way could provide multilingual TTS with minimum effort.

So, with the help of Omniglot, I created a book to speak "Welcome" in all of the languages supported by eSpeak:

"welcome.html" source:
Spoiler:
Code:
<?xml version="1.0"?><!--<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">--><html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style>
p {text-align: center}
<!--Should be U+1D800-U+1DAAF per Unicode v9, is U+40001-U+4FFFF (invalid ) per following font 
@font-face {
  font-family: "SuttonSignWriting";
  src: 
    local('SuttonSignWriting'),
    url("../Fonts/SuttonSignWriting.ttf");
}
.ssw {font-family: "SuttonSignWriting-Regular"; }
@font-face {
  font-family: "SuttonSignWritingFill";
  src: 
    local('SuttonSignWritingFill'),
    url("../Fonts/SuttonSignWritingFill.ttf");
}
.sswf {font-family: "SuttonSignWritingFill-Regular"; }
-->
</style>
</head>
<body>
<!--Afrikaans--><p xml:lang="af-ZA">Welkom</p>
<!--Amharic from Ethiopia in Ethiopic script--><p xml:lang="am-ET-Ethi">እንኳን ደህና መጣህ።</p>
<!--Aragonese from Spain in Latin script--><p xml:lang="an-ES-Latn">Bienveniu</p>
<!--Assamese from India in Bengali script--><p xml:lang="as-IN-Beng">আদৰণি</p>
<!--Azerbaijani from Azerbaijan in Latin script--><p xml:lang="az-AZ-Latn">Xoş gəlmişsiniz!</p>
<!--Bulgarian from Bulgary in Cyrillic script--><p xml:lang="bg-BG-Cyrl">Добре дошло</p>
<!--Bengali from Bangladesh in Bengali script--><p xml:lang="bn-BD-Beng">স্বাগতম</p>
<!--Bosnian from Bosnia and Herzegovina in Latin script--><p xml:lang="bs-BA-Latn">Dobrodošli</p>
<!--Catalan from Spain in Latin script--><p xml:lang="ca-ES-Latn">Benvingut</p>
<!--Central Kurdish (Sorani) in Latin script--><p xml:lang="ckb-Latn">Bi xêr bî</p>
<!--Czech from Czech Republic in Latin script--><p xml:lang="cs-CZ-Latn">Vítejte</p>
<!--Welsh from United Kingdom in Latin script--><p xml:lang="cy-GB-Latn">Croeso</p>
<!--Danish from Denmark in Latin script--><p xml:lang="da-DK-Latn">Velkommen</p>
<!--German from Germany in Latin script--><p xml:lang="de-DE-Latn">Willkommen</p>
<!--Modern Greek from Greece in Greek script--><p xml:lang="el-GR-Grek">Καλώς Όρισες</p>
<!--English American from United States in Latin script--><p xml:lang="en-US-Latn">Welcome</p>
<!--Esperanto in Latin script--><p xml:lang="eo-Latn">Bonvenon</p>
<!--Spanish from Spain in Latin script--><p xml:lang="es-ES-Latn">Bienvenido</p>
<!--Spanish from Latin America in Latin script--><p xml:lang="es-419-Latn">Bienvenido</p>
<!--Estonian from Estonia in Latin script--><p xml:lang="et-EE-Latn">Tere tulemast</p>
<!--Basque from Spain in Latin script--><p xml:lang="eu-ES-Latn">Ongi etorri</p>
<!--Persian (Farsi) from Islamic Republic of Iran in Arab script--><p xml:lang="fa-IR-Arab">خوش آمدی</p>
<!--Finnish from Finland in Latin script--><p xml:lang="fi-FI-Latn">Tervetuloa</p>
<!--French Canadian in Latin script--><p xml:lang="fr-CA-Latn">Bienvenue</p>
<!--Irish Gaelic (Latin Gaelic variant) from Ireland in Latin script--><p xml:lang="ga-latg-IE-Latn">Fáilte</p>
<!--Ancient Greek in Greek script--><p xml:lang="grc-Grek">Ἀσπάζομαι!</p>
<!--Gujarati in Gujarati script--><p xml:lang="gu-Gujr">પધારો</p>
<!--Hindi in Devanagari script--><p xml:lang="hi-Deva">सवागत हैं</p>
<!--Croatian from Croatia in Latin script--><p xml:lang="hr-HR-Latn">Dobrodošli</p>
<!--Hungarian from Hungary in Latin script--><p xml:lang="hu-HU-Latn">Üdvözlet</p>
<!--Armenian from Armenia in Armenian script--><p xml:lang="hy-AM-Armn">Բարի գալուստ!</p>
<!--International Auxiliary Language (interlingua) in Latin script--><p xml:lang="ia-Latn">Benvenite!</p>
<!--Indonesian from Indonesia in Latin script--><p xml:lang="id-ID-Latn">Selamat datang</p>
<!--Icelandic from Island in Latin script--><p xml:lang="is-IS-Latn">Velkominn</p>
<!--Italian from Italy in Latin script--><p xml:lang="it-IT-Latn">Benvenuto</p>
<!--Lojban in Latin script--><p xml:lang="jbo-Latn">fi'i</p>
<!--Georgian from Georgia in Georgian script--><p xml:lang="ka-GE-Geor">კეთილი იყოს თქვენი</p>
<!--Greenlandic from Greenland in Latin script--><p xml:lang="kl-GL-Latn">Tikilluarit</p>
<!--Northern Kurdish (Kurmanji) in Latin script--><p xml:lang="kmr-Latn">Be xer hatî</p>
<!--Kannada from India in Kannada script--><p xml:lang="kn-IN-Knda">ಸುಸ್ವಾಗತ</p>
<!--Korean from South Korea in Hangul script--><p xml:lang="ko-KR-Kore">환영합니다</p>
<!--Kurdish in Latin script--><p xml:lang="ku-Latn">Bi xêr bî</p>
<!--Classical Latin in Latin script--><p xml:lang="la-Latn">Salve</p>
<!--Lingua Franca Nova in Cyrilic script--><p xml:lang="lfn-Cyrl">Бонвени</p>
<!--Lithuanian from Lithuania in Latin script--><p xml:lang="lt-LT-Latn">Sveiki atvykę</p>
<!--Latvian from Latvia in Latin script--><p xml:lang="lv-LV-Latn">Sveiki atvykę</p>
<!--Macedonian from Macedonia in Cyrilic script--><p xml:lang="mk-MK-Cyrl">Добредојдовте</p>
<!--Malayalam from India in Mlym script--><p xml:lang="ml-IN-Mlym">സ്വാഗതം</p>
<!--Marathi from India in Devanagari script--><p xml:lang="mr-IN-Deva">स्वागत आहे</p>
<!--Malay from Malaysia in Latin script--><p xml:lang="ms-MY-Latn">Selamat datang</p>
<!--Nahuatl (Aztec) from Mexico in Latin script--><p xml:lang="nci-MX-Latn">Ximopanōltih</p>
<!--Nepali from Nepal in Devanagari script--><p xml:lang="ne-NP-Deva">स्वागतम्</p>
<!--Dutch from Netherlands in Latin script--><p xml:lang="nl-NL-Latn">Welkom</p>
<!--Norwegian from Norway in Latin script--><p xml:lang="no-NO-Latn">Velkommen</p>
<!--Oriya from India in Oriya script--><p xml:lang="or-IN-Oriya">ସ୍ବାଗତ</p>
<!--Punjabi in Gurmukhi script--><p xml:lang="pa-Guru">ਜੀ ਆਇਆ ਨੂੰ।</p>
<!--Papiamento in Latin script--><p xml:lang="pap-Latn">Bon bini</p>
<!--Polish from Poland in Latin script--><p xml:lang="pl-PL-Latn">Witajcie</p>
<!--Portuguese from Portugal in Latin script--><p xml:lang="pt-PT-Latn">Bem-vindo</p>
<!--Romanian from Romania--><p xml:lang="ro-RO-Latn">Bine ai venit</p>
<!--Russian from Russia in Cyrilic script--><p xml:lang="ru-RU-Cyrl">Добро пожаловать!</p>
<!--Sinhalese from Sri Lanka in Sinhala script--><p xml:lang="si-LK-Sinh">සාදරයෙන් පිලිගන්නවා</p>
<!--Slovak from Slovakia in Latin script--><p xml:lang="sk-SK-Latn">Vitaj</p>
<!--Slovenian from Slovenia in Latin script--><p xml:lang="sl-SI-Latn">Dobrodošli</p>
<!--Albanian from Albania in Latin script--><p xml:lang="sq-AL-Latn">Mirë se vjen</p>
<!--Serbian from Serbia in Cyrilic script--><p xml:lang="sr-RS-Cyrl">Добродошли</p>
<!--Swedish from Sweden in Latin script--><p xml:lang="sv-SE-Latn">Välkommen</p>
<!--Tamil from Sri Lanka in Tamil script--><p xml:lang="ta-LK-Taml">வாருங்கள்</p>
<!--Telugu from India in Telugu script (espeak no envelope?)--><p xml:lang="te-IN-Telu">సుస్వాగతం<</p>
<!--Turkish from Turkey in Latin script--><p xml:lang="tr-TR-Latn">Hoş geldin</p>
<!--Urdu from Pakistan in  Arab script--><p xml:lang="ur-PK-Arab">خوش آمدي</p>
<!--Vietnamese from Vietnam in Latin script--><p xml:lang="vi-VN-Latn">Được tiếp đãi ân cần</p>
<!--Chinese Mandarin Traditional from China --><p xml:lang="zh-cmn-Hant-CN">歡迎光臨</p>
<!--Chinese Mandarin Simplified from China--><p xml:lang="zh-cmn-Hans-CN">欢迎</p>
<!--Chinese Cantonese Traditional from Hong Kong--><p xml:lang="zh-yue-Hant-HK">歡迎</p>
<!--Chinese Cantonese Simplified from Hong Kong--><p xml:lang="zh-yue-Hans-HK">欢迎光临</p>

<p xml:lang="fr-CA">Ceci est une <I>table</I> française</p>
<p xml:lang="en-US">This is an english <I>table</I>. Same spelling but different prononciation:</p>
<p xml:lang="fr-CA"><I>Table,</I></p>
<break time="2s"/>
<p xml:lang="en-US"><I>Table!</I></p>

<!--American Sign Language from United States in Sutton SignWriting script U+1D800-U+1DAAF <div class="ssw"><p xml:lang="ase-US-Sgnw">񏈕񀀁񀀂񀀃񀀄</div></p>-->
<!--English NADSAT (my creation) in latin script just to use the private tag--><p xml:lang="en-Latn-x-NADSAT">Chelloveck Droog</p>
<!--Eastern Canadian Inuktitut from Canada in Unified Canadian Aboriginal Syllabics script--><p xml:lang="iu-ike-CA-Cans">ᑐᙵᓱ</p>
<!--Japanese from Japan in Hiragana + Katakana script from Japan--><p xml:lang="ja-Hrkt-JA">ようこそ</p>
<!--Burmese from Myanmar in Burmese script--><p xml:lang="my-MM-Mymr">ကြိုဆိုပါတယ်</p>
<!--Klingon variant in International Phonetic Alphabet script--><p xml:lang="tlh-fonipa">jɪʔɛl</p>
<!--Klingon variant in Latin script--><p xml:lang="tlh-Latn"><sub alias="Yee'Hell">yI'el</p>
<!--Klingon in Piqd script--><p xml:lang="tlh-Piqd"><sub alias="Yee'Hell"></p>
<!--Yiddish in Hebrew script--><p xml:lang="yi-Hebr">ברוך־הבא</p>
<!--English in Emoji script<p xml:lang="en-x-EMOJI">U+1F60A</p>-->
<!--French in Donger (emojicons, emoticons, kaomoji, Japanese emoticons, or text faces) script--><p xml:lang="fr-x-DONGER"> ¯\_(ツ)_/¯</p>

</body>
</html>
I tried to be faithful to RFC 5646 and conformant to the IANA language-subtag-registry

MOBI Book:
Spoiler:

When displayed it shows:
Spoiler:
Code:
Welkom

እንኳን ደህና መጣህ።

Bienveniu

আদৰণি

Xoş gəlmişsiniz!

Добре дошло

স্বাগতম

Dobrodošli

Benvingut

Bi xêr bî

Vítejte

Croeso

Velkommen

Willkommen

Καλώς Όρισες

Welcome

Bonvenon

Bienvenido

Bienvenido

Tere tulemast

Ongi etorri

خوش آمدی

Tervetuloa

Bienvenue

Fáilte

Ἀσπάζομαι!

પધારો

सवागत हैं

Dobrodošli

Üdvözlet

Բարի գալուստ!

Benvenite!

Selamat datang

Velkominn

Benvenuto

fi'i

კეთილი იყოს თქვენი

Tikilluarit

Be xer hatî

ಸುಸ್ವಾಗತ

환영합니다

Bi xêr bî

Salve

Бонвени

Sveiki atvykę

Sveiki atvykę

Добредојдовте

സ്വാഗതം

स्वागत आहे

Selamat datang

Ximopanōltih

स्वागतम्

Welkom

Velkommen

ସ୍ବାଗତ

ਜੀ ਆਇਆ ਨੂੰ।

Bon bini

Witajcie

Bem-vindo

Bine ai venit

Добро пожаловать!

සාදරයෙන් පිලිගන්නවා

Vitaj

Dobrodošli

Mirë se vjen

Добродошли

Välkommen

வாருங்கள்

సుస్వాగతం<

Hoş geldin

خوش آمدي

Được tiếp đãi ân cần

歡迎光臨

欢迎

歡迎

欢迎光临

Ceci est une table française

This is an english table. Same spelling but different prononciation:

Table,

Table!

Chelloveck Droog

ᑐᙵᓱ

ようこそ

ကြိုဆိုပါတယ်

jɪʔɛl

yI'el



ברוך־הבא

¯\_(ツ)_/¯

When spoken via "espeak -m -f welcome.html -w welcome.wav" it sounds:
Spoiler:


...Hoping you can have some fun too.

Last edited by PoP; 03-05-2017 at 12:58 PM. Reason: cross linking to KOreader forum
PoP is offline   Reply With Quote