Giter Club home page Giter Club logo

sharptalk's Introduction

SharpTalk

A .NET wrapper for the FonixTalk TTS engine.

This project was inspired by the creative antics of those utilizing Moonbase Alpha's TTS feature. Aeiou.

I searched around exhausively for a decent TTS engine apart from Microsoft's SAPI, which has a .NET implementation. I don't like SAPI because its features are complicated, it depends on having custom voices installed, and SSML generally makes me want to puke.

Eventually, I came across DECtalk and its accompanying SDK, from which I was able to get documentation for its functions. I spent countless hours implementing these in C# using P/Invoke, and I eventually got it working.

After noticing some issues with DECtalk, I migrated the library to its successor, FonixTalk.

Features

  • Asynchronous speaking
  • Phoneme events for mouth movements in games/animations
  • Stream output for exporting voice audio as PCM data
  • Sync() method makes it easy to synchronize voice output
  • Adjustable voice and speaking rate
  • Multiple engines can be independently controlled and talking at the same time
  • Voices can be paused/resumed

How to use

Using the library is very simple and straightforward. Here is the basic code to make the engine speak:

var tts = new FonixTalkEngine();
tts.Speak("John Madden!");

You can easily change the voice of the engine, too! For example, to use the Frank voice, just add one line:

var tts = new FonixTalkEngine();
tts.Voice = TTSVoice.Frank;
tts.Speak("Here comes another Chinese earthquake! [brbrbrbrbrbrbrbrbrbrbrbrbrbrbrbrbrbrbr]");

Exporting speech audio to memory is just as simple:

var tts = new FonixTalkEngine();
byte[] audioBytes = tts.SpeakToMemory("Eat your heart out, SAPI!");
// Process audio data here

Or if you'd like a WAV file instead, SharpTalk has you covered.

var tts = new FonixTalkEngine();
tts.SpeakToWAVFile("speech.wav", "[:dv gv 0 br 120][:rate 300]I'm BatMan.");

sharptalk's People

Contributors

tamschi avatar theberkin avatar

Watchers

 avatar

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.