[{"data":1,"prerenderedAt":56},["ShallowReactive",2],{"$f3m7gf1aodtoqz":3,"recommended":25},{"title":4,"path":5,"date":6,"updated":7,"tags":8,"excerpt":10,"readingMinutes":11,"commentCount":12,"html":13,"comments":14,"next":19,"prev":22},"AI Text-to-Speech models have accents too","\u002F2021\u002F07\u002Ftext-to-speech-models-have-accents-too\u002F","2021-07-10T11:13:00.022Z","2021-07-10T12:27:37.006Z",[9],"ai","While playing around with the Web Speech API I discovered something interesting: if you let the Dutch voice speak English text, it sounds remarkably like the typical \"Dungrish\" accent (Dutch person speaking English). I…",2,1,"\u003Cscript>\n  speechSynthesis.onvoiceschanged = function () {\n    speechSynthesis.getVoices().forEach(function(voice) {\n      var x = document.getElementById(\"voices\");\n      var option = document.createElement(\"option\");\n      option.text = voice.lang + \" - \" + voice.name;\n      option.value = voice.voiceURI;\n      if (voice.lang.indexOf('nl') === 0) {\n        option.selected = true;\n      }\n      x.add(option);\n    });\n  }\n  speechSynthesis.getVoices();\n  function speak(event) {\n    event.preventDefault();\n      var x = document.getElementById(\"voices\");\n      var y = document.getElementById(\"text\");\n\n        let utterance = new SpeechSynthesisUtterance(y.value);\n    speechSynthesis.getVoices().forEach(function(v) {\n      if (v.voiceURI === x.value) {\n        utterance.voice = v;\n        utterance.lang = v.lang.replace(\"_\", \"-\");\n      }\n    });\n        speechSynthesis.speak(utterance);\n    return false;\n  }\n  function speaktext(event, langCode, text) {\n    event.preventDefault();\n        let utterance = new SpeechSynthesisUtterance(text);\n        utterance.lang = \"en-US\";\n    let done = false;\n    speechSynthesis.getVoices().forEach(function(v) {\n      if (!done && v.lang.indexOf(langCode) === 0) {\n        utterance.voice = v;\n        utterance.lang = v.lang.replace(\"_\", \"-\");\n        done = true;\n      }\n    });\n        speechSynthesis.speak(utterance);\n    return false;\n\n  }\n\u003C\u002Fscript>\n\u003Cp>While playing around with the \u003Ca href=\"https:\u002F\u002Fdeveloper.mozilla.org\u002Fen-US\u002Fdocs\u002FWeb\u002FAPI\u002FWeb_Speech_API\">Web Speech API\u003C\u002Fa> I discovered something interesting: if you let the Dutch voice speak English text, it sounds remarkably like the typical &quot;Dungrish&quot; accent (Dutch person speaking English).\u003C\u002Fp>\n\u003Cp>I didn't expect this. Obviously the AI was not trained on reproducing foreign accents, but it still does!\u003C\u002Fp>\n\u003Cp>Very interesting to see what happens if you let the voice speak a language it was not trained on\u003C\u002Fp>\n\u003Cp>You can play around with it here if your browser supports it, or try the examples below:\u003C\u002Fp>\n\u003Cform onsubmit=\"return speak(event)\">\u003Clabel for=\"voices\">Select the voice, this might be empty if your browser doesn't support text to speech\u003C\u002Flabel>\u003Cselect id=\"voices\" name=\"voices\">\u003C\u002Fselect>\u003Cbr>\u003Clabel for=\"text\">Enter the text you want spoken\u003C\u002Flabel> \u003Ctextarea id=\"text\" name=\"text\" cols=\"100\" rows=\"10\">Hello good sir, can you please tell me what twenty times ten is?\u003C\u002Ftextarea>\u003Cbr>\u003Cinput type=\"submit\" value=\"Speak\">\u003C\u002Fform>\n\u003Cp>Or try these ready made examples:\u003C\u002Fp>\n\u003Cul>\n\u003Cli>\u003Ca onclick=\"return speaktext(event, 'nl', 'How do you do good sir? This is a Dutch accent.')\" href=\"#\">English text spoken by Dutch voice\u003C\u002Fa>\u003C\u002Fli>\n\u003Cli>\u003Ca onclick=\"return speaktext(event, 'hi', 'How do you do good sir? This is a Hindi accent.')\" href=\"#\">English text spoken by Hindi voice\u003C\u002Fa>\u003C\u002Fli>\n\u003Cli>\u003Ca onclick=\"return speaktext(event, 'it', 'How do you do good sir? This is an Italian accent.')\" href=\"#\">English text spoken by Italian voice\u003C\u002Fa>\u003C\u002Fli>\n\u003Cli>\u003Ca onclick=\"return speaktext(event, 'fr', 'How do you do good sir? This is a French accent.')\" href=\"#\">English text spoken by French voice\u003C\u002Fa>\u003C\u002Fli>\n\u003Cli>\u003Ca onclick=\"return speaktext(event, 'de', 'How do you do good sir? This is a German accent.')\" href=\"#\">English text spoken by German voice\u003C\u002Fa>\u003C\u002Fli>\n\u003Cli>\u003Ca onclick=\"return speaktext(event, 'ja', 'How do you do good sir? This is a Japanese accent.')\" href=\"#\">English text spoken by Japanese voice\u003C\u002Fa>\u003C\u002Fli>\n\u003Cli>\u003Ca onclick=\"return speaktext(event, 'en', 'Hoe gaat het met u? Dit is een Engels accent.')\" href=\"#\">Dutch text spoken by English voice\u003C\u002Fa>\u003C\u002Fli>\n\u003Cli>\u003Ca onclick=\"return speaktext(event, 'de', 'Hoe gaat het met u? Dit is een Engels accent.')\" href=\"#\">Dutch text spoken by German voice\u003C\u002Fa>\u003C\u002Fli>\n\u003Cli>\u003Ca onclick=\"return speaktext(event, 'nl', 'Wie geht es dir? Das ist ein niederländischer Akzent.')\" href=\"#\">German text spoken by Dutch voice\u003C\u002Fa>\u003C\u002Fli>\n\u003Cli>\u003Ca onclick=\"return speaktext(event, 'en', 'Wie geht es dir? Dies ist ein englischer Akzent.')\" href=\"#\">German text spoken by English voice\u003C\u002Fa>\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Cp>Once you're done playing around, \u003Ca href=\"https:\u002F\u002Fnews.ycombinator.com\u002Fitem?id=27792773\">discuss this on HN\u003C\u002Fa>\u003C\u002Fp>\n",[15],{"author":16,"date":17,"html":18},"Anonymous","2025-03-21T09:20:33.807+01:00","This unexpected discovery about Dutch \u003Ca href=\"https:\u002F\u002Flovevoice.ai\u002F\" rel=\"nofollow\">AI Voice Generator\u003C\u002Fa> voices mimicking the natural &#39;Dungrish&#39; accent when speaking English highlights how AI speech synthesis unintentionally captures human linguistic patterns, offering fascinating insights into cross-language phonetic adaptation.",{"title":20,"path":21},"Lego Mindstorms NXT Brick on Windows 10","\u002F2021\u002F08\u002Flego-mindstorms-nxt-brick-on-windows-10\u002F",{"title":23,"path":24},"Default HTML5 camera input broken on Android \u002F Chrome","\u002F2020\u002F10\u002Fdefault-html5-camera-input-broken-on\u002F",[26,31,36,39,43,46,49,53],{"title":27,"path":28,"note":29,"series":30},"Mapping out Dark Code","\u002F2026\u002F03\u002Fmapping-out-dark-code\u002F","2026",false,{"title":32,"path":33,"note":34,"series":35},"The software that I love","\u002F2022\u002F10\u002Fthe-software-that-i-love\u002F","Series · 36 posts",true,{"title":37,"path":38,"note":29,"series":30},"Navigating the Fog of War: Age of Empires, AI Agents, and the Rise of Dark Code","\u002F2026\u002F05\u002Fnavigating-fog-of-war-age-of-empires-ai\u002F",{"title":40,"path":41,"note":42,"series":30},"The Future of Programming Systems - four thoughts","\u002F2024\u002F09\u002Fthe-future-of-programming-systems-four\u002F","2024",{"title":44,"path":45,"note":42,"series":30},"Always Optimize the Feedback Loop","\u002F2024\u002F07\u002Falways-optimize-feedback-loop\u002F",{"title":47,"path":48,"note":42,"series":30},"\"Security Is Our Top Priority\" is BS","\u002F2024\u002F07\u002Fsecurity-is-our-top-priority-is-bs\u002F",{"title":50,"path":51,"note":52,"series":30},"10x teams","\u002F2025\u002F02\u002F10x-teams\u002F","2025",{"title":54,"path":55,"note":52,"series":30},"Hiring, from the Other Side","\u002F2025\u002F10\u002Fhiring-from-other-side\u002F",1792876809039]