yeokm1/doschgpt

SBTalker proper driver

Closed this issue ยท 6 comments

Hello!

I'm very impressed with your work and thank you for very detailed and interesting article!
I've was curious about Sound Blaster Talker driver that you're using, so I disassembled "Read.exe" tool and found out there are debug information leftovers. And decided to write my own implementation of this API which can be found there:

https://github.com/systoolz/dosbtalk

Note that since there is no documentation on internals it's safe to use only DetectSpeech(), SetGlobals(), Say() and SetEcho() routines, but this should be enough. See "talk.c" code for example. Also please note that due to internal driver buffer limitation you can't voiceover text larger than 255 characters. But I hope this will be useful. Thank you!

yeokm1 commented

Very impressive effort! If I had this earlier, I would have integrated your work into my app. I noticed a "speak female" in your code too. Certainly interesting as I thought the male voice was the only option.

You should create a demo video and maybe a short blog post and share it on like Hackaday. :)

Driver file "SBTALKER.EXE" contains text "SmoothTalker (R), Version 3.5, male voice", so I guess there is only male voice sound bank samples. I've already tried SpeakF() and "gender" option (function argument names taken from the debug information) on SetGlobals() but without any luck. It's probably only API functions but unfortunately without proper sound bank data it's useless.

As for code itself - I write it yesterday because I think it's better than calling "Read.exe" each time (no unnecessary delays or screen output, no external program dependencies and so on). It's just a humble suggestion and help with your project if you feel like to update something. You can also tweak and change voice with the settings of tone, volume, pitch, speed or even add the echo to more of your liking, so it would sound different than default voice of "Dr. Sbaitso" that everyone knew. Also note that whole phrase like "Hello world!" sounds a bit different comparing to pronouncing separate words "Hello" and "world!" (check out "TALK.EXE" example file from repository in DOSBox).

As for video or Hackaday - I'm not sure there is much to say about disassembling and recreating this code but I will think about it. Thank you!

yeokm1 commented

I gave your program a try. I think there is small issue though. It seems the last character of each word is not pronounced. For example if I say "talk 1000", it will speak it as one-hundred.

Other than this tiny issue, I agree with you it's much better to call the "API" programmatically than repeatedly calling "read.exe" again and again.

If I need to make an update to my DOS ChatGPT client, I can consider including your library.

I think there is small issue though.

Many thanks for pointing this out! Shame on me - when I rewrite BufferData() code I've forgot to add +1 to the first byte where string length is stored since loop counter goes from zero. I've updated source codes and "TALK.EXE" example program. Thank you!

yeokm1 commented

Hi @systoolz

I integrated your library into my app in this latest v0.15 version.

This is the demo video: https://www.youtube.com/watch?v=3L2jj7tDIoU

I have also adjusted my blog post to mention this.

I only had to make some minor changes to make it compatible with Openwatcom.

  • _dos_getvect()
  • asm functions to mov di and si registers

Thanks for your work!

Awesome! It's real Smooth Talker now.

And thank you for pointing out the compatibility changes!