{"id":81,"date":"2025-07-14T15:55:44","date_gmt":"2025-07-14T15:55:44","guid":{"rendered":"https:\/\/blogs.scummvm.org\/alikhan\/?p=81"},"modified":"2025-07-14T15:58:31","modified_gmt":"2025-07-14T15:58:31","slug":"week-6","status":"publish","type":"post","link":"https:\/\/blogs.scummvm.org\/alikhan\/2025\/07\/14\/week-6\/","title":{"rendered":"Week 6"},"content":{"rendered":"<p>Last week I continued to work on TeenAgent, in particular implementing the support for voiceovers. I first wasn&#8217;t sure about that since I could not find anything related to voicing in the sources we had. However, because the engine can load the voices and play them, I decided to map the voice indices to each text and play the voices in the same places where Text-To-Speech&#8217;s <code>sayText()<\/code> are called. Apart from this, there was a bug report for the qdEngine game, so I quickly returned to it to add support for punycode.<\/p>\n<p>The idea for implementing the voiceovers is as I said to map the voice indices (1..2043) to each text. I played with the sounds to see how the voice resources are located and figure out the ranges. For the most part, it was sequential. The ranges are as follows:<\/p>\n<ul>\n<li>1 &#8211; 333 Messages<\/li>\n<li>334 &#8211; 566 Scene objects descriptions<\/li>\n<li>567 &#8211; 591 Combination messages<\/li>\n<li>592 &#8211; 683 Item descriptions<\/li>\n<li>902 &#8211; 2040 Dialogs<\/li>\n<\/ul>\n<p>Interestingly the range [684 &#8211; 901] between Items and Dialogs is empty. Implementing the first four items were relatively easy. For the display message methods I just added an additional argument for voice ids, for others I extracted that from the newly added method &#8211; <code>getVoiceIndex()<\/code>. However, the dialogs were hardest to get right. At the moment of writing, I am still working on it, most of them are working, but still some parts are wrong. The main problem I discovered is that the voice resources for dialogs are <strong>not really ordered<\/strong>, not every dialog line is voiced and some voice resources are <span style=\"text-decoration: underline\">empty<\/span>. For the empty voices, I discovered that checking the size, i.e, if its too small is enough. That is, all of those voice resources are 4 bytes in size and I got the list of them and implemented <code>isVoiceIndexEmpty()<\/code> helper method. But the fact that some voices are not ordered, really became an issue and I had to manually find, listen and check every problematic dialog\/lines. Because of this, the method for computing voice indices became a mess, and I had to rewrite it over and over.<\/p>\n<p>Despite the difficulties presented above, I am close to finishing it, and once the dialogs are done, all text in the game will have a voiceover. Good thing is that I have every line of text extracted from the previous weeks, so even if I don&#8217;t know Polish, I still can with relatively no problem find the the exact text from the voices I hear.<\/p>\n<p>For this week, I first plan to finish this task (today) and then move to working on the next engine &#8211; MacVenture.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Last week I continued to work on TeenAgent, in particular implementing the support for voiceovers. I first wasn&#8217;t sure about that since I could not find anything related to voicing in the sources we had. However, because the engine can load the voices and play them, I decided to map the voice indices to each [&hellip;]<\/p>\n","protected":false},"author":26,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-81","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/blogs.scummvm.org\/alikhan\/wp-json\/wp\/v2\/posts\/81","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.scummvm.org\/alikhan\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.scummvm.org\/alikhan\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.scummvm.org\/alikhan\/wp-json\/wp\/v2\/users\/26"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.scummvm.org\/alikhan\/wp-json\/wp\/v2\/comments?post=81"}],"version-history":[{"count":6,"href":"https:\/\/blogs.scummvm.org\/alikhan\/wp-json\/wp\/v2\/posts\/81\/revisions"}],"predecessor-version":[{"id":87,"href":"https:\/\/blogs.scummvm.org\/alikhan\/wp-json\/wp\/v2\/posts\/81\/revisions\/87"}],"wp:attachment":[{"href":"https:\/\/blogs.scummvm.org\/alikhan\/wp-json\/wp\/v2\/media?parent=81"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.scummvm.org\/alikhan\/wp-json\/wp\/v2\/categories?post=81"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.scummvm.org\/alikhan\/wp-json\/wp\/v2\/tags?post=81"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}