Code Monkey home page Code Monkey logo

msspeechsdk_v011_wine_howto's Introduction

Reliability: works for me

  • use Ubuntu to build a TTS app for Windows
  • make it work on Windows 8
  • make it work in Wine

Installing MS Speech SDK v11

Tested with Ubuntu focal and winehq-stable version 7.0.0.0~focal-1.

  • WineHQ install instructions: https://wiki.winehq.org/Ubuntu
    • When I read them, the PPA was incomplete, so I had to use the official (non-PPA) apt repo described in the instructions.
  1. Recommended: To avoid side effects, create a new wine prefix and work there.

  2. Decide the CPU architecture to use inside your wineprefix and/or on actual windows target machines.

    • Configure your wine prefix appropriately. This probably means setting the WINEARCH environment variable.
    • I always just use WINEARCH=win32 anyway because I build inside a wine prefix in which I run some ancient proprietary abandonware anyway.
  3. Collect the files you'll need to install.

  4. Set your wine prefix's windows version to Windows 8: run winecfg to GUI-configure it, or winetricks win8 for automatic.

  5. Independen of what mono runtime version your Ubuntu has, your wineprefix needs exactly version 4.0 of the .NET framework. Install that. (Might take several minutes.) You might need to uninstall Mono first (run wine uninstaller). An easy way to do both is to install winetricks and cabextract, then run winetricks dotnet40.

    • Hint for future me: To detect which version of .NET is required, make a fresh wine prefix, uninstall Mono (wine uninstaller), then run the self-made TTS app from next chapter. Its error message will list acceptable .NET versions.
  6. The above step might have reset your windows version, so make sure it's still Windows 8, adjust if needed.

  7. Install the Runtime: wine msiexec /i setups/SpeechPlatformRuntime.msi should start the install dialog.

  8. Install the SDK: msiexec (as above), dialog-powered.

    • Remember into which directory you install the SDK. In this tutorial I'll assume C:\MS_SpeechSDK_v011. You'll need DLL files from the SDK's Assembly subdirectory.
  9. Install languages: msiexec (as above), non-interactive.

    • On Windows, this means the only dialog you'll see (if your machine is slow enough ;-) ) is a progress dialog, which auto-closes on success.
    • In wine, it installs completely silently, so you'll have to just hope it succeeds. (Or you may strace it.)

Create your first TTS app

  1. If you don't yet have a C# compiler, apt-get install mono-devel mono-mcs mono-runtime
  2. Clone this repo, or create a new directory and copy the speakArgs.cs from this repo. It's based on this example code: https://msdn.microsoft.com/en-us/library/hh378340(v=office.14).aspx
  3. Copy or symlink the Microsoft.Speech.dll from the SDK Assembly subdirectory.
    • NB: There are at least two versions of the SAPI:
      • Microsoft.Speech.* is the server version. This one I managed to make work in wine.
      • System.Speech.* is the desktop version. Trying to use this one in wine made my program crash. If you'd like to tinker with it anyway, copy or symlink the System.Speech.dll from the .NET framework; in my case it's in this path in wine's C: drive: windows/Microsoft.NET/Framework/v4.0.30319/WPF/System.Speech.dll
  4. Compile it: mcs /reference:System.Speech.dll speakArgs.cs
    • It should succeed silently and create a file speakArgs.exe.

Run it in wine:

  1. Verify you have at least one TTS voice installed; they should be at Program Files/Common Files/Microsoft Shared/Speech/Tokens.
  2. Check your audio settings, set volume tentatively low for your default output device.
  3. Run wine speakArgs.exe
  4. If you didn't hear anything, retry at louder volumes. If it still doesn't work, let's investigate.

msspeechsdk_v011_wine_howto's People

Contributors

mk-pmb avatar

Stargazers

Michael H avatar  avatar Dave Akers avatar Inom Turdikulov avatar  avatar Bocke avatar  avatar kohane27 avatar  avatar EnderIce2 avatar HeitorJr avatar PLACEHOLDER avatar Vasily Pankratov avatar

Watchers

HeitorJr avatar  avatar  avatar

Forkers

heitoradao

msspeechsdk_v011_wine_howto's Issues

Make a TTS CLI

Planned features:

  • Speak text
    • short one-line input
    • multi-line input with custom end mark
    • read textfile
    • read SSML (XML)
    • speak into wave file
  • List available voices
    • and their features
  • Configure volume
  • Select and configure voice
  • Interactive mode suitable for running as a xinetd service
  • Select TTS mechanism (server or desktop)

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.