Web interface for Microsoft Sam & friends
Web interface for Microsoft Sam & friends written in C & D (vibe-d), runnable on headless linux.
Demo: https://tetyys.com/SAPI4
SAPI4SDK.exe
)build.bat
. If you have Visual Studio older than 2022, change vcvars32 pathldc2
and dub
dub --compiler=ldc2 --arch=x86 --build=release
wine
(sudo apt install wine
), 1.8.7 is fine. If wine doesn't work on your system, you must stop herewine spchapi.exe
wine tv_enua.exe
public
(static web assets)sapi4.exe
(web server)sapi4.dll
(SAPI4 voice audio generation library)sapi4limits.exe
(SAPI4 voice enumerator)sapi4out.exe
(SAPI4 voice audio generation program)
to a new empty folderxvfb
(apt install xvfb
)while true; do; xvfb-run -a wine sapi4.exe; sleep 1; done;
location ^~ /SAPI4/ { proxy_pass http://127.0.0.1:23451/; }
. Note that the web server will work only on /SAPI4/
location, if you want to change that, change references to scripts and other assets in SAPI4_web/views/layout.dt
, SAPI4_web/public/scripts/tts.js
.http(s)://localhost/SAPI4/
, put soi soi soi soi soi soi soi soi soi soi soi soi soi soi soi soi soi soi soi soi soi
as text, set speed to 450 and enjoy.You might be familiar with Speakonia. As CFS-Technologies have released an unlimited license (http://www.cfs-technologies.com/home/) for Speakonia, you can get .wavs Microsoft Sam & other voices genereated text with Speakonia too, however web interface is more convenient and generates text much faster. Speakonia is set to generate text at real-time of speaking speed and SAPI4 server is set to generate text at x16777215 of real-time speaking speed. You can download .wavs from web interface too (right click the player and press Save audio as...
, at least on Chrome).
You can generate text from an API too, endpoints are /SAPI4/VoiceLimitations?voice=(voice)
and /SAPI4/SAPI4?text=(text)[&voice=(voice)][&pitch=(pitch)][&speed=(speed)]
. ()
- required parameters, []
- optional parameters.