Speech to text module for Godot 3

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
Comments
  • Is this being worked on?

    Is this being worked on?

    Hi. Is this module being worked on? I'm planning to use this addon and wanted to know if it works on Godot 3.x? Have you tried this on 3.3? Thanks for making this though!

  • Help with get() on STTqueue

    Help with get() on STTqueue

    Discussed in https://github.com/menip/godot_speech_to_text/discussions/6

    Originally posted by middlepattern July 5, 2021 I'm wondering if anyone can help with this:

    When I try to use the 'get()' command on my queue (something like...):

    user_input = stt.get_queue().get() print(user_input)

    I get an error saying: "Invalid call to function 'get' in base 'STTQueue'. Expected 1 arguments.

    It seems to want a string arg, but I'm not sure what string it wants. Also, in the inspector the queue only shows one property "capacity", which is the number of keywords it's holding - but there does not seem to be an array or resource or something where I can access the spoken words. I apologize if this is not an issue for anyone else.

  • Editor issues

    Editor issues

    1. You can't set the STTConfig files via the filemanager, because the star and dot in front of the filetype is missing.
    2. In STTRunner node there is a field for queue but you can't use it. When clicking STTQueue this error appears: godot-speech-to-text-error6
    3. Special characters like ä, ö, ü and ß (in German) are skipped or have this: ° spaß -> spa゚ glück -> glck
    4. If you stop the program with the editor (F5), the user://stt files are not deleted. If you close it with the X only these files aren't deleted. Is this intended?
  • Can't compile godot with this module.

    Can't compile godot with this module.

    I can't build godot 3.2.3 from source with this module because of the errors. Would you mind sending me an already compiled godot exe file with stt module?

  • feature request: kws words list as variable

    feature request: kws words list as variable

    It would very useful if I could change the kws list of words during runtime, I mean, the fewer words the better because less prone to recognition errors, so, I wish to contextualize the words that the user can use at every zone of the game. The most comfortable way would be to pass the words list to STTRunner as a variable string. What do you think about it?

Go module for communicating with the Veryfi OCR API
Go module for communicating with the Veryfi OCR API

veryfi-go is a Go module for communicating with the Veryfi OCR API Installing This package can be installed by cloning this directory: git clone https

Jan 5, 2023
Golang module for working with VK API

VK SDK for Golang VK SDK for Golang ready implementation of the main VK API functions for Go. Russian documentation Features Version API 5.131. API 40

Dec 10, 2022
This program performs stress testing for the Cosmos module

Cosmos Modules Testing Program ?? Overview This program performs stress testing for the Cosmos module. Support: Liquidity , IBC transfer Note: Require

May 25, 2022
A Lambda function built with SAM (Serverless Application Module)

AWS SAM Lambda Function © Israel Pereira Tavares da Silva The AWS Serverless Application Model (SAM) is an open-source framework for building serverle

Dec 19, 2021
Golang ergonomic declarative generics module inspired by Rust, including Result, Option, and more.

gust Golang ergonomic declarative generics module inspired by Rust. Go Version go≥1.18 Features Result Avoid if err != nil, handle result with chain m

Jan 7, 2023
text to speech bot for discord
text to speech bot for discord

text to speech bot for discord

Oct 1, 2022
:book: A Golang library for text processing, including tokenization, part-of-speech tagging, and named-entity extraction.

prose prose is a natural language processing library (English only, at the moment) in pure Go. It supports tokenization, segmentation, part-of-speech

Jan 4, 2023
Google GCP Text-to-Speech Service in one simple binary ;)

Google text-to-speak Simple Binary file This repository is a simple implementation of google text-to-speak service. Required enable API in GCP (https:

Dec 25, 2022
Ttsaas-clone - Text To Speech As A Service

TTSAAS Text To Speech As A Service Dependencies Be sure to install the following

Feb 2, 2022
Kakoune syntax highlighting for the Godot Engine / Godot Scripting Language gdscript
Kakoune syntax highlighting for the Godot Engine / Godot Scripting Language gdscript

gdscript-kak Kakoune syntax highlighting for the Godot Engine / Godot Scripting Language gdscript. Adds basic syntax highlighting to your .gd files fo

Mar 2, 2021
PHP functions implementation to Golang. This package is for the Go beginners who have developed PHP code before. You can use PHP like functions in your app, module etc. when you add this module to your project.

PHP Functions for Golang - phpfuncs PHP functions implementation to Golang. This package is for the Go beginners who have developed PHP code before. Y

Dec 30, 2022
💻 PTerm | Pretty Terminal Printer A golang module to print pretty text
💻 PTerm | Pretty Terminal Printer A golang module to print pretty text

✨ PTerm is a modern go module to beautify console output. Featuring charts, progressbars, tables, trees, and many more ?? It's completely configurable and 100% cross-platform compatible.

Jan 1, 2023
Module for underline text

Underline Module for underline text Usage underline.Custom("Lorem ipsum dolor sit amet", "+", true) // Lorem ipsum dolor sit amet // ++++++++++++++++

Oct 14, 2021
A Go package for n-gram based text categorization, with support for utf-8 and raw text

A Go package for n-gram based text categorization, with support for utf-8 and raw text. To do: write documentation make it faster Keywords: text categ

Nov 28, 2022
A Go package for n-gram based text categorization, with support for utf-8 and raw text

A Go package for n-gram based text categorization, with support for utf-8 and raw text. To do: write documentation make it faster Keywords: text categ

Nov 28, 2022
Chalk is a Go Package which can be used for making terminal output more vibrant with text colors, text styles and background colors.
Chalk is a Go Package which can be used for making terminal output more vibrant with text colors, text styles and background colors.

Chalk Chalk is a Go Package which can be used for making terminal output more vibrant with text colors, text styles and background colors. Documentati

Oct 29, 2022
Jan 27, 2022
Generates random text based on trigrams generated from input text
Generates random text based on trigrams generated from input text

Trigrams Generates random text based on trigrams generated from input text Contents Building Running Using Implementation notes NGram size Maximum wor

Feb 9, 2022
Read the text of memes, then inject that text into the image as searchable metadata.
Read the text of memes, then inject that text into the image as searchable metadata.

Make Meme Text Searchable I have an extensive set of memes I've been collecting since the early days of Flickr. #icanhascheeseburger It's a pain in th

May 2, 2022
✨ #PTerm is a modern go module to beautify console output. Featuring charts, progressbars, tables, trees, and many more 🚀 It's completely configurable and 100% cross-platform compatible.
✨ #PTerm is a modern go module to beautify console output. Featuring charts, progressbars, tables, trees, and many more 🚀 It's completely configurable and 100% cross-platform compatible.

?? PTerm | Pretty Terminal Printer A golang module to print pretty text Show Demo Code PTerm.sh | Installation | Documentation | Quick Start | Example

Dec 27, 2022