Page 1 of 1

UniversalSpeech - speak to screen readers

Posted: Tue Dec 31, 2024 6:32 pm
by Quin
There's a library, called Universal Speech, for outputting to multiple different screen readers on the Windows platform. Normally it ships as a DLL alongside the DLLs needed to call out to screen readers, but a friend and me managed to compile it as a static library for inclusion into a project, and I wrapped it into PB.

Code: Select all

ImportC "oldnames.lib"
strnicmp(String1.p-Ascii, String2.p-Ascii, Count)
EndImport

Import "UniversalSpeechStatic.lib"
speechSay(Text.p-Unicode, Interrupt)
brailleDisplay(Text.p-Unicode)
speechStop()
EndImport

Procedure BrailleText(Text$)
brailleDisplay(Text$)
EndProcedure

Procedure SpeakText(Text$, Interrupt = #False)
speechSay(Text$, Interrupt)
EndProcedure

Procedure OutputText(Text$, Interrupt = #False)
BrailleText(Text$)
SpeakText(Text$, Interrupt)
EndProcedure

Procedure StopSpeech()
speechStop()
EndProcedure
You can download the lib file, all the needed DLLs, and the PB file from here: https://quinbox.xyz/pb/usl.zip
Enjoy, and may this make more PB applications accessible!
:)

Re: UniversalSpeech - speak to screen readers

Posted: Tue Dec 31, 2024 7:50 pm
by idle
That could be useful thanks