Using Tolk is fairly easy, but to get it set up you need to collect a few files from the Tolk archive you downloaded and put them in your working directory with whatever script your working on.
After uncompressing it to, say, a directory called Tolk, go to "tolk/src/python/" and copy Tolk.py to your working directory.
Next go to "tolk/bin/x86/" and copy Tolk.dll to your working directory.
Then go to "Tolk/lib/x86/" and copy everything there to your working directory, which should be dolapi32.dll, nvdacontrollerclient32.dll, and saapi32.dll.
Now, tolk.py is the script you import to run Tolk, its a python wrapper for Tolk.dll. Tolk.dll uses the 3 other files, dolapi32, nvdacontrollerclient32, and saapi32, to interface with various types of screenreaders like NVDA. So, if you plan on distributing files you'll need to include all of these with your binary. Also, if your running on a 64 bit system, grab the files from the x64 folders instead of the x86 folders, so Tolk.dll from "tolk/bin/x64", and everything in "Tolk/lib/x64". Now to use Tolk with those files in your working directory just use commands like this:
import Tolk
#initialize tolk
Tolk.load()
#get tolks functions
print(dir(Tolk))
#detect available screen readers
print(Tolk.detect_screen_reader())
#check if braille, speech, or tolk are loaded
print(Tolk.has_braille(), Tolk.has_speech(), Tolk.is_loaded())
#if tolk is speaking, silence it
Tolk.silence()
#have tolk speak
Tolk.output('Talking!')
#output text to a braille display
Tolk.braille("braille!")
#check if tolk is speaking
print(Tolk.is_speaking())
#when the program is finished, unload tolk
Tolk.unload()
Keep in mind that Tolk will need some time to actually, you know, speak. So a better example might involve waiting and whatnot, but you get the idea.
-
BrushTone v1.3.3: Accessible Paint Tool
-
AudiMesh3D v1.0.0: Accessible 3D Model Viewer