BlitzSpeech

Version 1.0 

Written by Michael Denathorn (https://www.syntaxboom.com)

Windows Text-to-Speech DLL for BlitzMax and Blitz3D, but not "limited to", due to the nature of the DLL.

Features:

- SAPI 5.3+ text-to-speech
- SAPI XML markup support (rate, pitch, volume, pauses, etc.)
- WAV file export with custom quality
- Desktop + OneCore voice support
- Multiple language voices
- Read file contents with auto-encoding detection (ANSI, UTF-8 with or without BOM, UTF-16LE and UTF16BE)

License:

BlitzSpeech is licensed under the MIT License - see license.txt

Free for personal and commercial use!

Attribution:

While not legally required, please consider crediting BlitzSpeech in your project! It helps others discover the library and supports continued development.

Ways to Give Credit:

While not legally required, if you use BlitzSpeech in your project, I would
greatly appreciate attribution in one or more of the following ways:

- Include the license.txt file with your distribution
- Credit in your application's About dialog or credits screen:
"Text-to-Speech powered by BlitzSpeech"
-  Mention in your README or documentation:
"Uses BlitzSpeech by Michael Denathorn"
- Link to the community where this project resides: https://www.syntaxboom.com

Usage example for BlitzMax-NG:

' Initialize
If InitSpeech() <> SP_INIT_SUCCESS Then RuntimeError "Failed to init speech"

' Speak
SpeakText("Hello from BlitzMax!")

' Cleanup
CleanupSpeech()


Usage example for Blitz3D:

Place "BlitzSpeech.dll" and "BlitzSpeech.decls" in the "userlibs" folder, then:

InitSpeech()
SpeakText("Hello from Blitz3D!")
CleanupSpeech()


Related Documentation:

SAPI-XML - https://learn.microsoft.com/en-us/previous-versions/windows/desktop/ms717077(v=vs.85)

See "BlitzMax-NG Examples" folder for code samples, you will need to move both BlitzSpeech.lib and
BlitzSpeech.dll into that folder before building them, these are found in the "bin" folder. 
Likewise, you will have to put these in your own projects folder too.

Things to note:

The initial binary for BlitzSpeech is x86, but you can find a x64 version in
the "X64 Build" folder. Testing in BlitzMax-NG allows the use of the x86 version
in both x86 and x64 builds. The x64 version is there "Just in case".

Even though your using the BlitzSpeech.lib file in the build, remember, you still need
to ship the BlitzSpeech.dll file with your executable.

I did try to get SSML to work, but, it wouldnt play nice, but SAPI XML is just as handy,
and works with all voices, doesnt matter if they are 'Desktop' or 'OneCore', where SSML
is OneCore only apparently.

When testing this with other language voices, I accidently turned my PC French, lol, thankfully
I managed to fix it! :P

Support:

If you find a bug or have a feature request, please visit https://www.syntaxboom.com to 
let me know what is what.

If you extend the use of BlitzSpeech to other languages then I would appreciate it if
you let me share that on the website, or within the download zipped file, with full
accreditation to yourself of course.

Acknowledgments:

- Built with Microsoft SAPI
- Thanks to all the members from SyntaxBoom for putting up with me! :)


If you use BlitzSpeech in your project, I'd love to hear about it too!

Feel free to let me know over at SyntaxBoom! :)

- Michael (Dabzy)

