Giter VIP home page Giter VIP logo

godot-tts's Introduction

Godot TTS

This addon was primarily developed for the Godot Accessibility addon, but should work well in other contexts where a Godot game might require text-to-speech.

Supported Platforms

Text-to-speech is complicated, and some features may not work everywhere. Most optional features have an associated boolean property used to determine if the feature is available. Further, while I do attempt to ensure that this addon works as well as possible on all platforms, there may be bugs, and pull requests are welcome. Known supported platforms include:

  • Windows
    • Screen readers/SAPI via Tolk (requires use_tolk Cargo feature)
    • WinRT
  • Linux via Speech Dispatcher
  • MacOS
    • AppKit on MacOS 10.13 and below
    • AVFoundation on MacOS 10.14 and above, and iOS
  • Web

Features

Note that not all features are supported on all synthesizers. Any feature that may not be supported has a boolean property that can be checked to determine whether it works on the current platform.

  • Speaking text, with interruption support on most platforms
  • Stopping speech in progress
  • Getting and setting speech rate in both native synthesizer units and percentages
  • Detecting whether a screen reader is active
  • Determining whether the synthesizer is speaking, and sending a signal on completion

API

The public-facing API is contained entirely within TTS.GD.

Download

Download the latest release.

Notes on Android

Usage on Android is a bit more complicated:

  • Set up a custom Android build.
  • Create a directory reachable at res://android/plugins and place the godot-tts.aar and .godot-tts.gdap files from a release into that directory.
  • Update res://android/build/config.gradle to specify a minSdk of at least 21. Individual versions may vary, but minSdk is the critical value from this example:
ext.versions = [
    androidGradlePlugin: '3.5.3',
    compileSdk         : 29,
    minSdk             : 21,
    targetSdk          : 29,
    buildTools         : '29.0.3',
    supportCoreUtils   : '1.0.0',
    kotlinVersion      : '1.3.61',
    v4Support          : '1.0.0'

]

Notes on Universal Windows Platform

Godot's UWP export is currently broken. In order to use this addon in a UWP game, do the following:

  1. Export to UWP.
  2. Extract the newly-created .appx file with makeappx unpack.
  3. If you've extracted the .appx file to a directory like _mygame_, copy addons\godot-tts\target\release\godot_tts.dll to mygame\game\addons\godot-tts\target\release\godot_tts.dll, creating the directory if it doesn't exist.
  4. Repack the appx using makeappx.

It should then be ready to sign and install. Hopefully Godot's UWP export will eventually copy GDNative DLLs correctly so this procedure isn't necessary.

godot-tts's People

Contributors

ellenhp avatar ndarilek 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.