AD SPACE AVAILABLE · BRAND PARTNERS WELCOME

Correcting Fantasy Names and RPG Dialogue with Uberduck G2P API and ARPAbet Overrides

Ana Lázaro Touza · 365Finds Editorial
Indexed 88,650 Wiki articles

Put 365 Wiki to work with your AI

Copy the prompt below, paste it into the AI you already use, then ask your question.

Download full Skill

Try it with the prompt first. If you use 365 Wiki often, install the full 365Wiki Skill so you do not have to paste it again. No regular AI? Gemini or Microsoft Copilot on the web will work.

365Wiki Skill

Game narrative teams and audio designers face a recurring immersion killer when scaling dialogue production with AI speech synthesis: out-of-vocabulary fantasy names, constructed languages (conlangs), archaic titles, and fictional geography almost always sound wrong. Neural text-to-speech models are trained on general web corpora and standard English pronouncing dictionaries like CMUdict. When fed terms like Aethelgard, Xal'korath, or Caelumvance, standard grapheme-to-phoneme (G2P) converters make arbitrary phonetic guesses. Worse, two different character voices often assign opposing syllable stresses to the same faction name, destroying worldbuilding consistency.

Amateur workflows attempt to solve this with crude phonetic respellings in the prompt text—writing "Ay-thel-gard" or "Kor-vair." At 365Finds, we strongly advise game development teams against relying on prompt-level respelling hacks for production dialogue pipelines. Prompt respelling pollutes game subtitle strings, breaks across voice model updates, and creates unpredictable vowel coloring. The professional solution is deterministic phoneme control: using Uberduck's native G2P inspection endpoint to diagnose phonetic misalignments, curating a centralized project lexicon, and injecting explicit ARPAbet phoneme sequences into the speech synthesis pipeline.


1. How Uberduck Handles G2P and the ARPAbet Standard

In speech synthesis architectures, the Grapheme-to-Phoneme (G2P) engine acts as the translation layer between orthographic text (letters) and acoustic units (phonemes). When a dialogue string is sent to Uberduck, the system first maps every word into discrete phonetic tokens before feeding them to acoustic models such as Tacotron 2 or FastSpeech 2.

Uberduck exposes this intermediate layer directly through its G2P endpoint:

GET https://api.uberduck.ai/g2p?text=Aethelgard

The endpoint returns a structured JSON payload containing both the flattened phoneme sequence and a dictionary breakdown of how each word was analyzed:

{
  "arpabet": "EY1 DH AH0 L G AA2 R D",
  "lookups": {
    "Aethelgard": [
      "EY1",
      "DH",
      "AH0",
      "L",
      "G",
      "AA2",
      "R",
      "D"
    ]
  }
}

The ARPAbet Phonetic Alphabet in Game Audio

ARPAbet represents American English phonemes using uppercase ASCII characters. Unlike the International Phonetic Alphabet (IPA), ARPAbet requires no special unicode symbols, making it ideal for version-controlled JSON lexicons and automated build tools.

For game audio designers, the most crucial component of ARPAbet is lexical stress notation, appended as numeric digits to vowel phonemes:

Phoneme TypeSymbolExample WordRole in Fantasy Dialogue
Vowels (Stressed)AA1, AE1, EH1, IH1, IY1bot; bat; bet; bit; beeEstablishes the tonic syllable in noble or elven proper names
Vowels (Unstressed)AH0, AX0, ER0sofa; teacherSoftens trailing syllables in polysyllabic place names
DiphthongsEY1, AY1, OW1, AW1, OY1bait; bite; boat; bout; boyControls elongated archaic vowels in magic incantations
FricativesDH, TH, SH, ZHthis; thin; ship; visionDistinguishes hard guttural consonants from soft elven sibilants
Affricates & StopsCH, JH, K, G, P, B, T, Dcheap; jeep; king; gateRegulates heavy dwarven or orcish rhythmic percussions

By altering stress digits and vowel boundaries, developers alter the linguistic lineage of a name. For instance, shifting Aeloria from EY1 L AO0 R IY0 AH0 (first-syllable Anglo stress) to EY0 L AO1 R IY0 AH0 (second-syllable Romance stress) immediately elevates the character's delivery from mundane to regal.


2. Voice Model Capabilities and Architecture Constraints

Before executing phoneme overrides across an entire NPC cast, audio teams must verify the underlying architecture of each selected voice model. Uberduck hosts a heterogeneous catalog of voices, ranging from custom community-trained neural checkpoints to provider-backed services.

Query the voice details via the /voices API to verify phonetic compatibility:

GET https://api.uberduck.ai/voices/{voicemodel_uuid}/detail

The response reveals three decisive fields for dialogue engineering:

{
  "display_name": "Narrator - Dark Fantasy",
  "architecture": "tacotron2",
  "symbol_set": "arpabet",
  "controls": true,
  "hifi_gan_vocoder": "v1"
}

Architectural Rules for Studio Pipelines:

  1. symbol_set: "arpabet": Confirms that the acoustic model was trained directly on ARPAbet phoneme sequences. These voices can receive raw phoneme token streams without unexpected token drops.
  2. controls: true: Indicates whether the endpoint accepts custom pace, pitch, and duration arrays in the synthesis request, allowing micro-timing adjustments across individual syllables.
  3. Provider Models (Polly / Azure wrappers): If a voice is backed by cloud provider engines rather than native open-source neural checkpoints, direct ARPAbet strings inside the text property may be spoken literally as letter names. In those instances, developers must route overrides through SSML <phoneme ph="..."> blocks or calibrated phonetic approximations.

3. Designing a Two-Track Dialogue Middleware Pipeline

In a professional game engine workflow (Unreal Engine, Unity, Godot), raw synthesis strings must never be tightly coupled to user-facing subtitle text. Dialogue pipelines must maintain two independent data streams:

  1. Display Track (display_text): Clean, canonically spelled lore text passed directly to UI dialogue widgets and localization managers.
  2. Acoustic Track (spoken_text / phoneme_stream): Preprocessed strings containing ARPAbet overrides or phoneme tokens, consumed strictly by the audio generation engine.
+-------------------------------------------------------------+
|                Narrative Script / Dialogue DB               |
|          "Welcome to Aethelgard, Champion of Xal'korath."    |
+-------------------------------------------------------------+
                               |
         +---------------------+---------------------+
         |                                           |
         v                                           v
+-------------------------------+   +---------------------------------+
|      UI Subtitle Channel      |   |   Audio Generation Middleware   |
|   (Unchanged Lore Strings)    |   |  - Query /g2p Baseline          |
|   "Welcome to Aethelgard..."  |   |  - Match Fantasy Lexicon Table  |
+-------------------------------+   |  - Inject ARPAbet Overrides     |
                                    +---------------------------------+
                                                     |
                                                     v
                                    +---------------------------------+
                                    |     Uberduck TTS API Engine     |
                                    |   POST /speak-synchronous       |
                                    |   POST /speak (Batch Pre-bake)  |
                                    +---------------------------------+
                                                     |
                                                     v
                                    +---------------------------------+
                                    |    Game Audio Assets (.wav)     |
                                    |    Wwise / FMOD Event Binding   |
                                    +---------------------------------+

Step 1: Automated Script Auditing with GET /g2p

When writers commit new dialogue lines, an automated CI/CD script parses all proper nouns against the game's canonical dictionary. Any unverified fantasy term is dispatched to Uberduck's /g2p endpoint to detect potential mispronunciations before voice generation begins.

import os
import requests

UBERDUCK_API_KEY = os.getenv("UBERDUCK_KEY")
UBERDUCK_API_SECRET = os.getenv("UBERDUCK_SECRET")
AUTH = (UBERDUCK_API_KEY, UBERDUCK_API_SECRET)

def inspect_pronunciation(word: str) -> dict:
    url = "https://api.uberduck.ai/g2p"
    response = requests.get(url, params={"text": word}, auth=AUTH)
    response.raise_for_status()
    return response.json()

# Audit a fantasy placename
audit_result = inspect_pronunciation("Khad'garum")
print("G2P ARPAbet Default:", audit_result.get("arpabet"))
print("Lookup Mapping:", audit_result.get("lookups"))

Step 2: Maintaining the Master Project Lexicon

Game sound teams should store all project-specific proper nouns in a centralized JSON dictionary. This ensures that every dialogue line spoken by any character in any quest references the exact same phonetic mapping:

{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "project": "Eldoria_RPG",
  "pronunciation_lexicon": {
    "Aethelgard": {
      "canonical_arpabet": "EY1 DH AH0 L G AA2 R D",
      "notes": "High Elven capital; primary stress on first syllable; soft voiced dental fricative DH"
    },
    "Xal'korath": {
      "canonical_arpabet": "Z AE0 L K AO1 R AE0 TH",
      "notes": "Ancient void deity; voiceless alveolar fricative Z prefix; primary stress on second syllable"
    },
    "Drak'tharon": {
      "canonical_arpabet": "D R AA1 K TH AA0 R AO2 N",
      "notes": "Dwarven keep; primary stress on first syllable; hard stop K followed by unvoiced dental fricative TH"
    },
    "Caelumvance": {
      "canonical_arpabet": "S IY1 L AH0 M V AE2 N S",
      "notes": "Arcane academy; soft C pronounced as S IY1"
    }
  }
}

Step 3: Injecting Overrides and Synthesizing Dialogue

Once the dialogue text is tokenized, terms matching the project lexicon are replaced with their verified ARPAbet sequences, or structured for phoneme-enabled voice models. The preprocessed line is then dispatched to Uberduck's synthesis endpoints.

Uberduck offers two synthesis pathways depending on the development context:

  1. Synchronous Auditioning (POST /speak-synchronous): Returns binary 16-bit 22.05 kHz WAV data directly in the HTTP response. Ideal for in-editor audio audition tools in Unreal Engine or Unity, allowing dialogue designers to tweak phoneme stress numbers with sub-second feedback.
  2. Asynchronous Batch Export (POST /speak): Returns a job uuid. The pipeline polls GET /speak-status?uuid=... until finished_at is populated, returning the CDN audio URL. Ideal for offline nightly builds generating tens of thousands of NPC lines.
import time
import requests

def synthesize_dialogue_sync(speech_payload: str, voice_uuid: str, output_path: str):
    """
    Synchronous synthesis for rapid in-editor auditioning.
    Returns 16-bit WAV binary data at 22050 Hz.
    """
    url = "https://api.uberduck.ai/speak-synchronous"
    body = {
        "speech": speech_payload,
        "voicemodel_uuid": voice_uuid,
        "pace": 1.0
    }
    
    response = requests.post(url, json=body, auth=AUTH)
    response.raise_for_status()
    
    with open(output_path, "wb") as f:
        f.write(response.content)
    print(f"Rendered synchronous audio to {output_path}")

def synthesize_dialogue_batch(speech_payload: str, voice_uuid: str) -> str:
    """
    Asynchronous synthesis for automated build systems.
    Submits job, polls status, and returns final asset URL.
    """
    speak_url = "https://api.uberduck.ai/speak"
    body = {
        "speech": speech_payload,
        "voicemodel_uuid": voice_uuid
    }
    
    init_res = requests.post(speak_url, json=body, auth=AUTH)
    init_res.raise_for_status()
    task_uuid = init_res.json()["uuid"]
    
    status_url = "https://api.uberduck.ai/speak-status"
    while True:
        status_res = requests.get(status_url, params={"uuid": task_uuid}, auth=AUTH)
        status_res.raise_for_status()
        data = status_res.json()
        
        if data.get("failed_at"):
            raise RuntimeError(f"Speech synthesis job {task_uuid} failed.")
        if data.get("finished_at"):
            return data["path"]
            
        time.sleep(1.0)

4. Real-World RPG Pronunciation Tuning Scenarios

To illustrate the concrete audio transformation, consider three common fantasy dialogue scenarios where unmanaged TTS engines reliably break character immersion:

Scenario A: Elven Royal Surnames (Resolving Vowel Clash)

Scenario B: Guttural Orcish Strongholds (Correcting Glottal Stops and Consonant Blends)

Scenario C: Archaic Eldritch Entities (Heteronym and Stress Inversion)


5. 365Finds Commercial Evaluation and Recommendations

Building game dialogue workflows around Uberduck presents distinct commercial advantages as well as engineering constraints.

Where Uberduck Excels:

Critical Limitations to Factor In:

The 365Finds Verdict:

For independent and mid-tier RPG studios building procedural NPC dialogue or prototyping narrative arcs, Uberduck provides the most developer-transparent phonetic toolchain in its price tier. We recommend setting up a dual-track dialogue pipeline: use Uberduck's /g2p endpoint as an automated pronunciation linter during narrative design, maintain a project-wide ARPAbet dictionary in version control, and pre-bake NPC dialogue assets via asynchronous batch calls for production builds.


References