menip / godot_speech_to_text

Speech to text module for Godot 3

Home Page:https://samuraisigma.github.io/godot-docs/doc/community/tutorials/misc/speech_to_text.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Speech to Text module for Godot

This is a Speech to Text (STT) module for Godot. In other words, a module that captures the user's microphone input and converts it to text.

Requirements

The module may be built with Godot 3.2 on the following platforms:

  • Windows
  • OS X
  • Unix (with PulseAudio or ALSA requirement)
  • iOS
  • Android

I've only verified the x11 build, haven't yet tested export builds.

Check if your system fulfills Godot's building requirements on the desired platform, or for cross-compiling to another system. Other than that, Speech to Text has no additional requirements. It is intended to be used alongside a microphone connected to the system, which will capture voice input.

Building Godot with the module

The following steps assume that you are on a Unix system. For a different platform supported by the module, use the equivalent tools.

  1. If you don't have the source code for Godot, clone its repository from GitHub.

    $ git clone https://github.com/godotengine/godot
    
  2. Inside the cloned repository, change to the latest stable build that the module works on (when these instructions were made, it was 3.2).

    $ cd godot
    $ git checkout 3.2
    
  3. Clone this repository inside Godot's modules/ directory, and switch back to godot root before compile.

    $ cd modules
    $ git clone https://github.com/menip/godot_speech_to_text.git
    $ cd ../
    
  4. Build Godot, according to your desired platform (follow the instructions given on the Godot Docs).

  5. Run Godot:

    $ ./bin/godot*tools*
    
  6. In order to check if the module was successfully added, follow these final steps:

    6.1. After opening Godot, click the New Project button on the right side to open the Create New Project window.

    6.2. On the new window, add a Project Path (I'd recommend an empty directory) and a Project Name (you are free to choose as you like).

    6.3. Click Create to open the Godot project editor window.

    6.4. On the right side, there should be a Scene tab with a window below it. Click the first icon below the Scene label, which has a plus symbol +, to create a new node.

    6.5. Check if the STTRunner appears in the list of nodes; it should probably be near the end of the list. There is also a search bar for convenience.

Usage

Check the html tutorial here for more information on how to use the module.

Export templates

If you wish to export a game that uses the Speech to Text module, you will first need to build export templates for the desired platform.

Check the instructions and requirements on the Godot Docs site to learn how to build export templates for a specific system. This includes cross compiling for opposite bits or even for a different platform.

TODO: Add Godot 3 demo.

Third party libraries

The below third party libraries were used in this Speech to Text module.

sphinxbase

Files extracted from upstream source:

  • src/libsphinxbase/*, except from: Makefile.*
  • src/libsphinxad/*, except from: Makefile.*
  • include/*, except from: Makefile.*, config.h.in, sphinx_config.h.in
  • LICENSE

pocketsphinx

Files extracted from upstream source:

  • src/libpocketsphinx/* as src/, except from: Makefile.*
  • include/*, except from: Makefile.*
  • LICENSE

About

Speech to text module for Godot 3

https://samuraisigma.github.io/godot-docs/doc/community/tutorials/misc/speech_to_text.html

License:MIT License


Languages

Language:C 98.4%Language:C++ 1.1%Language:Python 0.2%Language:Yacc 0.2%