TOWK.Utility.CrossSpeak 1.0.0

dotnet add package TOWK.Utility.CrossSpeak --version 1.0.0                
NuGet\Install-Package TOWK.Utility.CrossSpeak -Version 1.0.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="TOWK.Utility.CrossSpeak" Version="1.0.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add TOWK.Utility.CrossSpeak --version 1.0.0                
#r "nuget: TOWK.Utility.CrossSpeak, 1.0.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install TOWK.Utility.CrossSpeak as a Cake Addin
#addin nuget:?package=TOWK.Utility.CrossSpeak&version=1.0.0

// Install TOWK.Utility.CrossSpeak as a Cake Tool
#tool nuget:?package=TOWK.Utility.CrossSpeak&version=1.0.0                

CrossSpeak

A cross-platform C# library designed for seamless integration with the active screen reader on Windows, macOS, and Linux systems. It provides a unified interface for developers to incorporate screen reader functionality into their applications, making it easier to create inclusive and accessible software experiences. This library only works 64-bit environment and it uses Tolk for windows, libspeechdwrapper for linux and libspeak for MacOSX.

Compatibility

As the library is built .NET Standard 2.0, it is compatible with .NET 2.0+, .NET Core 2.0+ and .NET Framework 4.6.1+. More info.

Installation

From Nuget.org

The library is available on nuget and you can use the following command to add it to your project:

dotnet add package TOWK.Utility.CrossSpeak --version 1.0.0

Manual

Download the latest version from releases and extract the contents to your project's root. Add the reference to CrossSpeak.dll in your project's file as follows:

<ItemGroup>
	<Reference Include="./CrossSpeak.dll" />
</ItemGroup>

You would also need to copy the screen reader libraries to the output directory, here's how you can set it up to always copy them on build in your project's file:

<Target Name="CopyCustomContent" AfterTargets="AfterBuild">
	<Copy SourceFiles="lib\screen-reader-libs\linux\libspeechdwrapper.so" DestinationFolder="$(OutDir)lib\screen-reader-libs\linux" />
	<Copy SourceFiles="lib\screen-reader-libs\windows\nvdaControllerClient64.dll" DestinationFolder="$(OutDir)lib\screen-reader-libs\windows" />
	<Copy SourceFiles="lib\screen-reader-libs\windows\SAAPI64.dll" DestinationFolder="$(OutDir)lib\screen-reader-libs\windows" />
	<Copy SourceFiles="lib\screen-reader-libs\windows\Tolk.dll" DestinationFolder="$(OutDir)lib\screen-reader-libs\windows" />
	<Copy SourceFiles="lib\screen-reader-libs\macos\libspeak.dylib" DestinationFolder="$(OutDir)lib\screen-reader-libs\macos" />
</Target>

How to use

Using CrossSpeak is pretty straightforward. Initialize the library and then you can easily interact interact with the active screen reader using the provided API. Check out IScreenReader.cs to get an understanding about the different API method calls.

Here's a quick example:

using CrossSpeak;

CrossSpeakManager.Instance.Initialize();
CrossSpeakManager.Instance.Speak("Hello there!");
CrossSpeakManager.Instance.Close();

Make sure to always call the Close() method before your application closes.

Future Plans

  1. Improve linux support by updating libspeechdwrapper, maybe use C/C++ for the wrapper library.

Known Issues

  1. The IsSpeaking() method always returns false for windows. I think this is something that needs to be fixed in Tolk itself.
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.0 443 2/18/2024