AIDevKit - AI Suite for Unity
API ReferencesDiscordGlitch9
  • Introduction
    • AI Dev Kit 3.7.0
    • Troubleshooting
    • FAQ
    • Update Logs
      • AI Dev Kit v2
      • AI Dev Kit v1
  • Quick Start
    • API Key Setup
      • OpenAI
      • Google Gemini
      • ElevenLabs
      • OpenRouter
    • Adding Models & Voices
      • Quick Add Guide
      • Creating Snippets
    • Self-Hosting with Ollama
  • Editor Tools
    • Editor Chat
    • Asset Generators
    • Asset Managers
      • Prompt History
      • File Manager
      • Chatbot Manager
      • Assistant Manager
  • GEN Tasks
    • Overview
      • Prefixes
      • Sequence
    • Response
    • Image
    • Video
    • SoundFX
    • Speech
    • Transcript
    • Voice Change
    • Audio Isolation
  • Components
    • Chatbot
    • Chatbot (Assistants API)
    • Realtime Assistant
    • Modules
    • Event Receivers
  • Platform API
    • OpenAI
      • 💬Chat completions
      • 🖼️Image operations
      • 🗣️Text to speech
      • 🎙️Speech to text
        • Recording real-time in Unity
      • 💾Files
      • 🔎Embeddings
      • 🛡️Moderations
      • ⚙️Fine-tuning
      • Assistants API
        • How it works
        • Creating custom functions
        • Creating assistants API
    • Google Gemini
      • 📝System instructions
      • 💬Text generation
      • ⚙️Fine-tuning
      • ▶️Fucntion calling
      • 🔎Embeddings
      • 🛡️Safety
      • 💻Code execution
  • Legacy Documents
    • AI Dev Kit 1.0
      • Preperation
      • Scriptable Toolkits
        • Chat Streamer
        • Image Generator
        • Voice Transcriber
        • Voice Generator
      • Editor Tools
      • Troubleshooting (Legacy)
        • ❗Build Error: The name 'UnityMenu' does not exist in the current context
        • ❗The type or namespace name 'AndroidJavaObject' could not be found
        • ❗The type or namaspace name 'Plastic' does not exist
        • ❗Build Error: The name 'Asset Database' does not exist in the current context
        • ❗'ModelData.Create(Provider, string, UnixTime?, string)': not all code paths return a value
      • Code Generators
        • C# Script Generator
        • Unity Component Generator
    • AI Dev Kit 2.0
      • Event Handlers
      • Editor Chat
      • Editor Vision (TTI, ITI)
      • Editor Speech (TTS)
      • Management Tools
        • Prompt History Viewer
        • AI Model Manager
        • TTS Voice Manager
        • OpenAI File Manager
        • OpenAI Assistant Manager
        • ElevenLabs Voice Library
Powered by GitBook
On this page
  1. Components

Modules

Optional modules that let your AI listen, speak, generate images, or execute functions.

PreviousRealtime AssistantNextEvent Receivers

Last updated 4 days ago

These modules act as optional extensions that can be plugged into AI components like , , and other higher-level interfaces.

They allow your AI to listen, speak, generate images, or execute user-defined functions in response to AI requests.


1. Speech to Text

Enables voice input functionality using microphone capture.

What it does

  • Records audio using the microphone.

  • Converts speech to text asynchronously.

  • Returns a object.

Typical usage Call StartRecording(), speak, then call StopRecording() to get the .

stt.StartRecording();
// user speaks
Transcript transcript = await stt.StopRecording();

Text to Speech

Provides voice output via TTS generation.

What it does

  • Can play automatically if AudioSource is attached.

GeneratedAudio audio = await tts.GenerateSpeechAsync("Hello!");
audioSource.clip = audio;
audioSource.Play();

Voice Changer

Applies optional pitch and speed post-processing to audio output.

What it does

  • Alters pitch and speed for stylistic or character-based transformation.

  • Simulates different speaker characteristics.

Optional Enhances immersion but is not required.


Image Generator

Generates images from natural language prompts.

What it does

  • Supports models like DALL·E (OpenAI) and Imagen (Google).

  • Customizable: resolution, style, aspect ratio, quality.

var image = await imageGenerator.GenerateImageAsync("A futuristic city at night");

Function Manager

Registers C# methods as callable functions through Function Calling.

What it does

  • Makes Unity methods callable by the AI.

  • Auto-generates parameter schema and metadata.

How to Use

  1. Assign a script with public void methods.

  2. Select a method in the Inspector.

  3. Optionally describe parameters for the AI.

public class GameFunctions : MonoBehaviour
{
    public void HealPlayer(int amount, string reason)
    {
        Debug.Log($"Healing player by {amount} because {reason}");
    }
}

Converts a string response into (AudioClip).

Use with or to read responses aloud.

Output Returns a containing a Texture2D.

Add to a GameObject.

GeneratedAudio
Chatbot
Chatbot (Assistants API)
GeneratedImage
FunctionManager
Chatbot
Chatbot (Assistants API)
Transcript
Transcript