mrvan Posted September 1 Share Posted September 1 Is there an existing method to translate text (char *) to the speech synthesizer's word library dynamically (while running), similar to Extended Basic's CALL SAY? A way is to generate a hash for each word to produce a lookup table, but the resources for its storage are not insignificant. Quote Link to comment Share on other sites More sharing options...
Asmusr Posted September 1 Share Posted September 1 (edited) 1 hour ago, mrvan said: Is there an existing method to translate text (char *) to the speech synthesizer's word library dynamically (while running), similar to Extended Basic's CALL SAY? A way is to generate a hash for each word to produce a lookup table, but the resources for its storage are not insignificant. The ROM contains a binary search tree. Edited September 1 by Asmusr 1 1 Quote Link to comment Share on other sites More sharing options...
+jedimatt42 Posted September 2 Share Posted September 2 The list is pretty limited. The EA manual details how to perform the lookup in the speech PHROMs. So you don't need to build your own table. The libti99 code hopefully provides hints about how to wait for results from the synthesizer. Like VDP RAM, the speech PHROMs are only accessible through the synthesizer. However, I figured since the vocabulary is so limited, it is pretty useless for user input. So for C, a set of defines seemed the most useful approach. A nice addition to the lib might be a routine that takes an array of the addresses and loops through the say, and wait functions. I didn't do that because I figured for game dev, you wouldn't want to block your game loop on an entire phrase set. But that is a compile time solution, and not what you asked for. Quote Link to comment Share on other sites More sharing options...
mrvan Posted September 3 Author Share Posted September 3 On 9/1/2023 at 9:50 AM, Asmusr said: The ROM contains a binary search tree. Thank you that’s good to know. Quote Link to comment Share on other sites More sharing options...
mrvan Posted September 3 Author Share Posted September 3 10 hours ago, jedimatt42 said: The list is pretty limited. The EA manual details how to perform the lookup in the speech PHROMs. So you don't need to build your own table. The libti99 code hopefully provides hints about how to wait for results from the synthesizer. Like VDP RAM, the speech PHROMs are only accessible through the synthesizer. However, I figured since the vocabulary is so limited, it is pretty useless for user input. So for C, a set of defines seemed the most useful approach. A nice addition to the lib might be a routine that takes an array of the addresses and loops through the say, and wait functions. I didn't do that because I figured for game dev, you wouldn't want to block your game loop on an entire phrase set. But that is a compile time solution, and not what you asked for. Interesting. Thanks. I’d not have expected the EA manual to have gotten into that. I read that manual about forty years ago, LOL, but just didn’t remember that being present. Will look that over. I’ve reviewed libti99 and your force command code and have used both to develop a cooperative multitasking playback of speech words defined in libti99. The queuing is only via arrays of the speech phroms. So all dressed up and few things to say. I may resort to a solution with extremely limited dynamic “translation” and generate most speech in the dev env. I looked at a tool yesterday that runs on the Mac (my native dev platform) but it’s not been maintained for almost a decade. May need to see if it can be resurrected either by the author or other contributors, or if necessary, me. Seems to be a bit of a dark art. 1 Quote Link to comment Share on other sites More sharing options...
+FarmerPotato Posted September 6 Share Posted September 6 @mrvan On 9/2/2023 at 8:20 PM, mrvan said: Ilooked at a tool yesterday that runs on the Mac (my native dev platform) but it’s not been maintained for almost a decade. May need to see if it can be resurrected either by the author or other contributors, or if necessary, me. Seems to be a bit of a dark art. Haha, dark art indeed. You're speaking of Blue Wizard? I'm a Mac guy too. I've gotten some fair speech codes out of it. Have not tried to edit the results. Your pitch and steady volume matters a lot. The SMU DeGolyer archive has some TI speech lab recordings on their web site. You can get an idea of how they required speakers to talk. I also found a lot of printouts of the LPC code matching some of those phrases. I hacked Blue Wizard adding two features for myself. An assembly source export format--still, the CSV export can be fed through a script. Another feature I kludged in is switching the coding table. The 5220 chip table it uses has more pitches--have not checked if Blue Wizard chooses some of those, but restricting it to MAME's 5200 coding table made playback in Blue Wizard about the same. I have found that the pre-emphasis amplification number is critical. TI states that it is critical to emphasize the lower frequencies (if I recall). Editing the LPC was *always* required at TI (from what I've found up to 1985.) That meant going through the frames, separating syllables, cutting out noise frames, and smoothing the pitch movement. (And maybe other parameters?) Blue Wizard generates discontinuities too. They should be edited. One such manual is in a thread here, Al Olson's documentation for the speech lab's editor. In the TI Archive at SMU DeGolyer Library , I found a manual for a Speech Education Module. This has Forth source for a similar but less-featured frame editor. Dunno if I can publish that. I found another document just last week--Kathleen M. Goudie wrote a 3 page brief for training new speech lab editors (meaning, people!) Will scan that. I have a bunch of Kathleen's 8" floppies with the source for Text to Speech--but the first disk I've read out appears to have been degaussed. (Found among Al Olson's papers.) (Borrowed a SuperCat device to capture the disk's flux image.) Along with other stuff I've gathered, look in https://gitlab.com/FarmerPotato/speech One of my tools LPCTOS.c will print decoded LPC. Will compile on MacOS for sure. 🙂. Look at ISRSPEECH.ASM. Paul Urbanus told me at VCF that it's originally from Parsec (which Urbanus coauthored). ( John Philips made a few changes.) I'd be curious to know how it compares with the code you came up with. I once had a separate thread about this.. Finally, @Stuart 's website shows some rare speech tools. 4 Quote Link to comment Share on other sites More sharing options...
mrvan Posted September 9 Author Share Posted September 9 On 9/6/2023 at 8:25 AM, FarmerPotato said: @mrvan Haha, dark art indeed. You're speaking of Blue Wizard? I'm a Mac guy too. I've gotten some fair speech codes out of it. Have not tried to edit the results. Your pitch and steady volume matters a lot. The SMU DeGolyer archive has some TI speech lab recordings on their web site. You can get an idea of how they required speakers to talk. I also found a lot of printouts of the LPC code matching some of those phrases. I hacked Blue Wizard adding two features for myself. An assembly source export format--still, the CSV export can be fed through a script. Another feature I kludged in is switching the coding table. The 5220 chip table it uses has more pitches--have not checked if Blue Wizard chooses some of those, but restricting it to MAME's 5200 coding table made playback in Blue Wizard about the same. I have found that the pre-emphasis amplification number is critical. TI states that it is critical to emphasize the lower frequencies (if I recall). Editing the LPC was *always* required at TI (from what I've found up to 1985.) That meant going through the frames, separating syllables, cutting out noise frames, and smoothing the pitch movement. (And maybe other parameters?) Blue Wizard generates discontinuities too. They should be edited. One such manual is in a thread here, Al Olson's documentation for the speech lab's editor. In the TI Archive at SMU DeGolyer Library , I found a manual for a Speech Education Module. This has Forth source for a similar but less-featured frame editor. Dunno if I can publish that. I found another document just last week--Kathleen M. Goudie wrote a 3 page brief for training new speech lab editors (meaning, people!) Will scan that. I have a bunch of Kathleen's 8" floppies with the source for Text to Speech--but the first disk I've read out appears to have been degaussed. (Found among Al Olson's papers.) (Borrowed a SuperCat device to capture the disk's flux image.) Along with other stuff I've gathered, look in https://gitlab.com/FarmerPotato/speech One of my tools LPCTOS.c will print decoded LPC. Will compile on MacOS for sure. 🙂. Look at ISRSPEECH.ASM. Paul Urbanus told me at VCF that it's originally from Parsec (which Urbanus coauthored). ( John Philips made a few changes.) I'd be curious to know how it compares with the code you came up with. I once had a separate thread about this.. Finally, @Stuart 's website shows some rare speech tools. Wow, thanks FarmerPotato! Lots of good info here. Yes, Blue Wizard it is. I'll definitely look into what you provided as I get into some game development. I really like speech and I thought that made Parsec so much better than it would have otherwise have been. My routine is on the simple side, injecting words from a circular queue when the speech synthesizer is idle. User programs can send speech single words or an array of words that then are queued. It's all C except for a couple of short methods that embed ASM and that I borrowed from JediMatt42's Force Command code base. Because I'm using coop-multitasking type techniques I don't have to be overly cautious about other operations going on as a true ISR would. I have so many projects I want to get into, speech synthesis, multi-processing with paging (ala SAMS) and much more. It's probably time I get into writing a game of some sorts to force some assessment and learning. 2 Quote Link to comment Share on other sites More sharing options...
+FarmerPotato Posted September 10 Share Posted September 10 I'm glad your excited! I look forward to your help, too, cracking this nut. Also see the other thread and check out what Eric Lafortune has finished. I have had a particular person's voice in mind for a while. I started a Parsec-themed game (the setting is the Parsec moon), but left it to work on hardware. That's where I would put speech. By co-op multitasking -- is your C program polling speech periodically, or do you have co-routines, or something else? My code makes one loop around all the things that need attention, like the speech synthesizer or (my code for) sprite motion. Then it kills time waiting for the VDP interrupt, when it is safe to write to VDP. Worst case, 16 ms goes by, just like with a ISR. Enough to keep the speech synthesizer happy. (Sprite motion is actually pretty easy--2 bytes for X, 2 for Y--you add signed amount to the 2-byte coordinate, the upper byte goes to the sprite attribute table.) 2 Quote Link to comment Share on other sites More sharing options...
mrvan Posted Tuesday at 05:44 AM Author Share Posted Tuesday at 05:44 AM On 9/10/2023 at 4:52 PM, FarmerPotato said: I'm glad your excited! I look forward to your help, too, cracking this nut. Also see the other thread and check out what Eric Lafortune has finished. I have had a particular person's voice in mind for a while. I started a Parsec-themed game (the setting is the Parsec moon), but left it to work on hardware. That's where I would put speech. By co-op multitasking -- is your C program polling speech periodically, or do you have co-routines, or something else? My code makes one loop around all the things that need attention, like the speech synthesizer or (my code for) sprite motion. Then it kills time waiting for the VDP interrupt, when it is safe to write to VDP. Worst case, 16 ms goes by, just like with a ISR. Enough to keep the speech synthesizer happy. (Sprite motion is actually pretty easy--2 bytes for X, 2 for Y--you add signed amount to the 2-byte coordinate, the upper byte goes to the sprite attribute table.) Ultimately the routines poll to determine if speech has stopped. The methodology is not perfected but still plays as well as XB and alllows a C program to continue executing while speaking as long as there’s brief moments of idleness, thus the cooperative part. That can be as little as scanning the keyboard. I’m thinking of future versions that add isrs and operate like the sound does. Still, makes me wonder why TI didn’t do that. Perhaps the slow responses of the voice synthesizer were a problem. 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.