Audio Generation

AI Dev Kit provides comprehensive audio generation capabilities including speech synthesis, transcription, translation, and audio effects.

Available Methods

1. Text to Speech (.GENSpeech())

Convert text to natural-sounding speech:

AudioClip speech = await "Welcome back, Commander!"
    .GENSpeech()
    .SetVoice(ElevenLabsVoice.Rachel)
    .ExecuteAsync();

Best for:

  • ✅ Voice-overs and narration

  • ✅ NPC dialogue

  • ✅ UI feedback

  • ✅ Accessibility features

2. Speech to Text (.GENTranscript())

Transcribe audio to text:

string transcript = await audioClip
    .GENTranscript()
    .ExecuteAsync();

Best for:

  • ✅ Voice commands

  • ✅ Speech recognition

  • ✅ Dictation

  • ✅ Audio file transcription

3. Speech Translation (.GENTranslation())

Translate speech to English:

Best for:

  • ✅ Multi-language support

  • ✅ Translation services

  • ✅ Accessibility

4. Sound Effects (.GENSoundEffect())

Generate sound effects from text:

Best for:

  • ✅ Dynamic SFX generation

  • ✅ Prototyping

  • ✅ Asset creation

5. Voice Change (.GENVoiceChange())

Convert voice to different style:

Best for:

  • ✅ Voice effects

  • ✅ Character voices

  • ✅ Voice modification

6. Audio Isolation (.GENAudioIsolation())

Isolate or enhance audio elements:

Best for:

  • ✅ Noise reduction

  • ✅ Voice isolation

  • ✅ Audio cleanup

Quick Comparison

Method
Input
Output
Providers

GENSpeech()

Text

AudioClip

OpenAI, ElevenLabs

GENTranscript()

AudioClip

String

OpenAI, Google

GENTranslation()

AudioClip

String

OpenAI

GENSoundEffect()

Text

AudioClip

ElevenLabs

GENVoiceChange()

AudioClip

AudioClip

ElevenLabs

GENAudioIsolation()

AudioClip

AudioClip

ElevenLabs

Basic Examples

Example 1: Simple TTS

Example 2: Transcribe Microphone

Example 3: Generate Game SFX

Configuration Options

Text to Speech

Speech to Text

Provider Support

OpenAI

ElevenLabs

Google

Common Workflows

Workflow 1: NPC Dialogue System

Workflow 2: Voice Command System

Workflow 3: Dynamic SFX Generator

Best Practices

✅ Good Practices

❌ Bad Practices

Next Steps

Last updated