Giter Site home page Giter Site logo

sapi4's Introduction

SAPI4

Web interface for Microsoft Sam & friends written in C & D (vibe-d), runnable on headless linux.

Demo: https://tetyys.com/SAPI4

Setup

SAPI4 server compilation on local Windows machine

  1. Install Microsoft Speech SDK 4.0 (SAPI4SDK.exe)
  2. Run build.bat. If you have Visual Studio older than 2022, change vcvars32 path
  3. Install ldc2 and dub
  4. Go to SAPI4_web and compile the web server: dub --compiler=ldc2 --arch=x86 --build=release

Web server compilation & SAPI4 setup on remote Linux machine

  1. Install wine (sudo apt install wine), 1.8.7 is fine. If wine doesn't work on your system, you must stop here
  2. In a VNC/RDP session or X11-forwarded SSH connection:
    • Install Microsoft Speech 4.0 API in the wine environment: wine spchapi.exe
    • Install Lernout & Hauspie TruVoice Amer. Eng. TTS Engine in the wine environment: wine tv_enua.exe
  3. Move:
    • 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 folder
  4. Install xvfb (apt install xvfb)
  5. Run web server: while true; do; xvfb-run -a wine sapi4.exe; sleep 1; done;
  6. Pass the web server through nginx - add this to nginx config: 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.
  7. Go to 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.

sapi4's People

Contributors

tetyys avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sapi4's Issues

Its Down :(

The Website Its Down, Fix Please, I Need To Use The Web SIte For A Music.

Error compiling web server

Running into the following error when I try to compile the web server.

sapi4 ~master: building configuration "application"...
Compiling Diet HTML template index.dt...
source/app.d(16,2): Error: variable `app.SAM.this.conn` has scoped destruction, cannot build closure
/usr/bin/dmd failed with exit code 1.

Installing spchapi.exe and tv_enua.exe on headless linux

When I run wine spchapi.exe and wine tv_enua.exe to install on a linux server, it doesn't appear to do anything other than spit out a couple warnings / errors.

root@ea145433ab2b:/SAPI4# wine spchapi.exe 
0048:err:explorer:initialize_display_settings Failed to query current display settings for L"\\\\.\\DISPLAY1".
0024:err:winediag:nodrv_CreateWindow Application tried to create a window, but no driver could be loaded.
0024:err:winediag:nodrv_CreateWindow Make sure that your X server is running and that $DISPLAY is set correctly.
root@ea145433ab2b:/SAPI4# wine tv_enua.exe 
0108:err:explorer:initialize_display_settings Failed to query current display settings for L"\\\\.\\DISPLAY1".
00f8:err:winediag:nodrv_CreateWindow Make sure that your X server is running and that $DISPLAY is set correctly.

How have you managed to install these on a headless linux? I'm assuming the issue is that the installers need to be clicked through but I'm unsure how that would even be done on headless linux

I have tried wine 3.0, 5.10, and 6.0.1 and it seems to be the same case for all.

504 Gateway Error - NEED HELP!

hello admin, i started having this error 3 days ago, and it still pops up. do you have a way to fix this error? and let me know when the site will be back up and running, thanks!

Error 502

I can't access the demo website because of it. What's going on?

no sapi4.hpp

Thanks for your code. Wondering where is your sapi4.hpp? It seems sapi4.hpp is not committed.

504 Gateway Time-out Problems

Every time I try to get on the website, it takes a long time to load, only for the 504 Gateway Time-out page to show up every time. WTF is going on, and why is no one being the good Samaritan and helping me? SamJoe404 should know how I feel as long as he is a Christian.

Failed to spawn process sapi4limits.exe

Attempting to compile local windows server and am stuck at step 4.

Using Visual Studio 2022 Community with the vcvars32 path defined correctly in build.bat

std.process.ProcessException@std\process.d(1358): Failed to spawn process "sapi4limits.exe" (The system cannot find the file specified.)
----------------
0x00E94B3F
0x00E948F2
0x00E8018E
Program exited with code 1

Guide mentions sapi4limits.exe but all I see is the.cpp. - am I missing something?

down

why it is down ๐Ÿ˜ญ๐Ÿ˜ญ๐Ÿ˜ญ๐Ÿ˜ญ๐Ÿ˜ญ

Builds

Hi!

Have you considered offering builds for this? At least for windows.

(I know you have a couple binaries, but I refer to the server in particular: sapi4.exe, sapi4.dll, sapi4limits.exe, and sapi4out.exe)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.