SpeechIOForUnity

-Fri, Aug 28, 2020-

A ready-to-use Unity plugin for Speech Input/Output using native Speech API of both Apple macOS and MS Windows.

github project page is here.

Author: Jotaro Shigeyama and Thijs Roumen

Features


SpeechOut speechOut = new SpeechOut();
SpeechIn  speechIn  = new SpeechIn(OnRecognized);

void Start(){
    Dialog();
}

async void Dialog(){
    await speechOut.Speak("Hello!");
    await speechIn.Listen(new string[] { "Hello", "Hi", "Hey" });
    await speechOut.Speak("How are you doing?");
    await speechIn.Listen(new string[] { "I'm fine", "Nah", "I'm Sick" });
    //...
}

This project repo contains

Installation

This plugin works and tested on macOS Catalina or above, and Windows 10 (Windows 8 is not supported).

OS setup

Right now English / Dutch / German / Japanese are supported. You need to install necessary language module from your OS setting.

Unity

Just simply grab all Scripts, Plugins (and if Scenes if you need) to your own Unity project file.

Potential installation issue for macOS

Some macOS users will experience broken speech input due to missing dictation kits: mostly because of bug on Apple. If you encounter some issue on speech input, please try these.

dev-Installation

Testing your NSSpeechRecognizer

tested on Apple Swift version 5.1.3

cd NSSpeechTest
swift run

Using in your own Unity package

Modifying voice command dictionary

See MyMacSpeechScript.cs.

Documentation

coming soon.

Your feedback is welcome!