Ctrl K
ring2all.com

PBX Voice Guide Module Documentation

Table of Contents

  1. Module Overview (Technical)
  2. Module Overview (Commercial/Business)
  3. Module Overview (End User/Administrator)
  4. Interface Features
  5. Voice Guide Generation
  6. Common Scenarios & Examples
  7. Limitations & Important Notes
  8. Troubleshooting Tips
  9. Glossary

---

1. Module Overview (Technical)

What Is PBX Voice Guide?

PBX Voice Guide is a voice prompts management system that allows administrators to view, create, and manage FreeSWITCH voice prompts. It supports both viewing existing prompt catalogs and generating new voice guides using AI TTS (Text-to-Speech) with OpenAI, Azure, or Google voices.

Architecture

Plaintext
┌─────────────────────────────────────────────────────────────────┐
│                 PBX Voice Guide Architecture                    │
├─────────────────────────────────────────────────────────────────┤
│                                                                 │
│  Admin Panel                                                    │
│  ┌──────────────────────────────────────────────────────────┐   │
│  │        PBX Voice Guide                                   │   │
│  │                                                          │   │
│  │  Catalog View:                                           │   │
│  │  ┌───────────────────────────────────────────────────┐   │   │
│  │  │ Prompt Name   │ Lang │ Voice │ Type   │ Actions │   │   │
│  │  ├───────────────┼──────┼───────┼────────┼─────────┤   │   │
│  │  │ English Emma  │ EN   │ emma  │ System │ ✏️      │   │   │
│  │  │ Spanish Paloma│ ES   │ paloma│ System │ ✏️      │   │   │
│  │  │ English Maria│ EN   │ maria │ Custom │ ✏️ 🗑️   │   │   │
│  │  └───────────────────────────────────────────────────┘   │   │
│  │                                                          │   │
│  │  [+ Create Voice Guide]                                  │   │
│  │                                                          │   │
│  └──────────────────────────────────────────────────────────┘   │
│       │                                                         │
│       ▼ Reads/Writes                                           │
│  ┌──────────────────────────────────────────────────────────┐   │
│  │        Voice Prompts Storage                             │   │
│  │                                                          │   │
│  │  /usr/share/freeswitch/sounds/                          │   │
│  │  ├─ en/us/emma/                                         │   │
│  │  │   ├─ ivr/                                            │   │
│  │  │   ├─ voicemail/                                      │   │
│  │  │   └─ digits/                                         │   │
│  │  ├─ es/us/paloma/                                       │   │
│  │  └─ (custom voices)                                     │   │
│  │                                                          │   │
│  └──────────────────────────────────────────────────────────┘   │
│       │                                                         │
│       ▼ AI TTS Generation                                      │
│  ┌──────────────────────────────────────────────────────────┐   │
│  │        AI Profile Integration                            │   │
│  │  ┌─────────────┬─────────────┬─────────────┐             │   │
│  │  │   OpenAI    │   Azure     │   Google    │             │   │
│  │  │   TTS-1     │   TTS       │   TTS       │             │   │
│  │  └─────────────┴─────────────┴─────────────┘             │   │
│  └──────────────────────────────────────────────────────────┘   │
│                                                                 │
└─────────────────────────────────────────────────────────────────┘

Key Tables

TablePurpose
public.voice_guidesVoice guide metadata (name, language, dialect, voice_name, is_system, is_fallback)
public.voice_guide_contentsIndividual prompt files within a voice guide

Key Files

FileDescription
modules/voiceGuides/Frontend module
modules/telephony/voice-guides/Backend API and services
/usr/share/freeswitch/sounds/Generated voice prompt files

Database Schema

Sql
CREATE TABLE public.voice_guides (
    id SERIAL PRIMARY KEY,
    uuid UUID NOT NULL DEFAULT uuid_generate_v4(),
    name TEXT NOT NULL,
    description TEXT,
    language_code VARCHAR(2) NOT NULL,
    dialect_code VARCHAR(2) NOT NULL,
    voice_name VARCHAR(50) NOT NULL,
    sound_path TEXT NOT NULL,
    is_fallback BOOLEAN NOT NULL DEFAULT FALSE,
    is_system BOOLEAN NOT NULL DEFAULT FALSE,
    enabled BOOLEAN NOT NULL DEFAULT TRUE,
    created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
    updated_at TIMESTAMPTZ
);

---

2. Module Overview (Commercial/Business)

Business Value

PBX Voice Guide provides voice prompt management and AI generation:

Without Voice GuideWith Voice Guide
Manual file creationAI-powered generation
SSH to upload filesWeb-based management
No inventory trackingComplete catalog view
Limited languagesUnlimited AI voices
Manual discoveryFiltered search

Use Cases

  1. Custom Voice Prompts
- Generate AI voice prompts in any language

- Use OpenAI, Azure, or Google TTS

  1. Language Expansion
- Add new language support

- Create regional dialects

  1. Brand Voice
- Create custom voice identities

- Consistent voice across IVR, voicemail, etc.

  1. Rapid Deployment
- Bulk generate prompts from CSV

- Batch processing with progress tracking

Feature Highlights

FeatureBenefit
AI TTS GenerationCreate prompts using AI voices
Batch ProcessingGenerate multiple prompts at once
Progress TrackingReal-time progress bar with count
CSV ImportBulk prompt definition
System ProtectionSystem guides cannot be deleted
Edit ModeAdd prompts to existing guides
Fallback ConfigIdentify fallback voices
---

3. Module Overview (End User/Administrator)

What Can You Do?

  • View all available voice guides
  • Create new voice guides with AI TTS
  • Edit existing guides (add more prompts)
  • Delete custom voice guides (system guides protected)
  • Filter by language, status, type
  • Search for specific guides
  • Track generation progress in real-time

Voice Guide List Interface

Plaintext
┌─────────────────────────────────────────────────────────────────┐
│              PBX Voice Guide                                    │
├─────────────────────────────────────────────────────────────────┤
│                                                                 │
│  [🔍 Search by name, language, dialect or voice...]            │
│                                                                 │
│  [+ Create Voice Guide]                          [🔄 Refresh]  │
│                                                                 │
│  ┌───────────────────────────────────────────────────────────┐  │
│  │ Prompt Name     │ Lang │ Voice   │ Type   │ Status│Actions│  │
│  ├─────────────────┼──────┼─────────┼────────┼───────┼───────┤  │
│  │ English Emma    │ EN   │ Emma    │ System │Enabled│ ✏️    │  │
│  │ Spanish Paloma  │ ES   │ Paloma  │ System │Enabled│ ✏️    │  │
│  │ English Maria   │ EN   │ Maria   │ Custom │Enabled│ ✏️ 🗑 │  │
│  └───────────────────────────────────────────────────────────┘  │
│                                                                 │
│  Showing 3 voice guides                                         │
│                                                                 │
└─────────────────────────────────────────────────────────────────┘

Voice Guide Types

TypeBadge ColorDeletableDescription
SystemBlue❌ NoPre-installed, protected guides
CustomGreen✅ YesUser-created guides

Quick Tips

TIP
Edit Mode: Click the edit icon on any guide to add more prompts to it.
TIP
CSV Format: Use path,filename,text format for bulk prompt definition.
WARNING
System Guides: System voice guides (Emma, Paloma) cannot be deleted.

---

4. Interface Features

List Columns

ColumnDescription
Prompt NameDisplay name of the voice guide
LanguageISO language code (EN, ES, FR)
DialectRegional variant (US, UK, MX)
Voice ProfileVoice name (emma, paloma)
Sound PathFreeSWITCH sound path
TypeSystem (protected) or Custom
StatusEnabled/Disabled
ActionsEdit, Delete (custom only)

Filters

FilterOptions
LanguageAll, English, Spanish, etc.
StatusAll, Enabled, Disabled
Fallback OnlyShow only fallback voices

Type Values

TypeDescription
SystemPre-installed, cannot be deleted
CustomUser-created, can be deleted
---

5. Voice Guide Generation

Create Voice Guide Form

Plaintext
┌─────────────────────────────────────────────────────────────────┐
│  🔊 Create Voice Guide                                          │
├─────────────────────────────────────────────────────────────────┤
│                                                                 │
│  ┌─ Configuration ─────────────────────────────────────────┐    │
│  │  Name: [English Custom Voice           ]                │    │
│  │  Description: [Custom IVR prompts for...    ] (optional)│    │
│  └─────────────────────────────────────────────────────────┘    │
│                                                                 │
│  ┌─ Language & Voice ──────────────────────────────────────┐    │
│  │  Language: [English ▼]  Dialect: [US ▼]                 │    │
│  │  Voice Name: [custom_voice    ]                         │    │
│  │  TTS Profile: [OpenAI TTS-1 HD - alloy ▼]               │    │
│  │                                                         │    │
│  │  📁 Output Path: en/us/custom_voice/                    │    │
│  └─────────────────────────────────────────────────────────┘    │
│                                                                 │
│  ┌─ Prompt Definitions ────────────────────────────────────┐    │
│  │  CSV Content (path,filename,text):                      │    │
│  │  ┌─────────────────────────────────────────────────────┐│    │
│  │  │ ivr,welcome,Welcome to our company                  ││    │
│  │  │ ivr,goodbye,Thank you for calling                   ││    │
│  │  │ voicemail,greeting,Please leave a message           ││    │
│  │  └─────────────────────────────────────────────────────┘│    │
│  │  [📁 Upload CSV File] or paste directly                 │    │
│  └─────────────────────────────────────────────────────────┘    │
│                                                                 │
│  ┌─ Prompts Preview (3 items) ─────────────────────────────┐    │
│  │  Path      │ Filename │ Text                   │ Status │    │
│  │  ivr       │ welcome  │ Welcome to our company │ ⏳     │    │
│  │  ivr       │ goodbye  │ Thank you for calling  │ ⏳     │    │
│  │  voicemail │ greeting │ Please leave a message │ ⏳     │    │
│  └─────────────────────────────────────────────────────────┘    │
│                                                                 │
├─────────────────────────────────────────────────────────────────┤
│  [Stop]       ████████████░░░░ 2/3 (67%)    [🔄 Generating...] │
└─────────────────────────────────────────────────────────────────┘

CSV Format

Csv
path,filename,text
ivr,welcome,Welcome to our company. How may I help you today?
ivr,goodbye,Thank you for calling. Goodbye!
ivr,hold,Please hold while we connect you.
voicemail,greeting,You have reached the voicemail of
voicemail,instructions,Please leave a message after the beep
digits,0,zero
digits,1,one
digits,2,two

Generation Features

FeatureDescription
Batch ProcessingProcesses prompts in batches of 10
Progress BarReal-time visual progress indicator
Count DisplayShows "X / Y (Z%)" during generation
Auto-scrollTable scrolls to show current batch
Status TrackingEach prompt shows ⏳ pending, ✅ completed, ❌ failed
Stop ButtonShows "Stop" during generation to abort batch processing
Cancel ButtonRestores original values in edit mode, resets form in create mode
Completion ModalSummary of generated vs failed prompts

Edit Mode

When editing an existing voice guide:

  • Language, Dialect, Voice Name are read-only (defines the path)
  • Can add new prompts to the existing guide
  • New prompts are appended or overwrite existing files

---

6. Common Scenarios & Examples

Scenario 1: Create Custom IVR Prompts

  1. Click "Create Voice Guide"
  2. Enter name: "Custom IVR English"
  3. Select Language: English, Dialect: US
  4. Enter Voice Name: "custom_ivr"
  5. Select TTS Profile (e.g., OpenAI alloy)
  6. Paste or upload CSV with prompts:
Csv
   ivr,main_menu,Press 1 for sales, 2 for support
   ivr,sales_queue,Connecting you to sales
   ivr,support_queue,Connecting you to support
   

  1. Click "Generate Voice Guide"
  2. Watch progress bar fill up
  3. Review completion summary

Scenario 2: Add Prompts to Existing Guide

  1. Find the voice guide in the list
  2. Click the Edit (pencil) icon
  3. Form opens with existing configuration (read-only)
  4. Paste new prompts in CSV format
  5. Click "Generate Voice Guide"
  6. New prompts are added to existing directory

Scenario 3: Identify System vs Custom Guides

  1. View the Type column in the list
  2. Blue "System" badge = Protected, cannot delete
  3. Green "Custom" badge = User-created, can delete
  4. System guides have no delete button in Actions

Scenario 4: Generate Multilingual Prompts

  1. Create separate voice guides for each language:
- "Spanish Mexico Prompts" (es/mx/custom)

- "French Canada Prompts" (fr/ca/custom)

  1. Use appropriate TTS profiles for each language
  2. Use same prompt structure (path/filename) for consistency

---

7. Limitations & Important Notes

Technical Notes

NOTE
Audio Format: Generated files are WAV format, 8kHz mono (telephony optimized).
NOTE
File Location: Files are saved to /usr/share/freeswitch/sounds/{language}/{dialect}/{voice_name}/.
WARNING
Overwrite Behavior: Generating a prompt with the same path/filename overwrites the existing file.
CAUTION
System Guides: Deleting system voice guides (is_system=true) is blocked at both UI and API level.

Best Practices

  1. Use Descriptive Names: Name guides clearly (e.g., "Custom IVR English HD")
  2. Plan Voice Names: Use lowercase, no spaces (e.g., "custom_ivr" not "Custom IVR")
  3. Consistent Structure: Use same path/filename patterns across languages
  4. Test Prompts: Generate a few prompts first before bulk generation
  5. Backup Before Overwrite: System won't backup existing files

Supported TTS Providers

ProviderVoicesQuality
OpenAIalloy, echo, fable, onyx, nova, shimmerHD available
AzureMultiple per languageNeural voices
GoogleMultiple per languageNeural voices
---

8. Troubleshooting Tips

Common Issues

SymptomPossible CauseSolution
"Generating..." stuckTTS API issueCheck AI Profile credentials
Prompts failInvalid text or pathCheck CSV format, remove special characters
No TTS profilesProfiles not configuredCreate AI Profiles with type=TTS
Cannot delete guideSystem guideSystem guides are protected
Edit button opens emptyGuide data issueRefresh the list
Progress bar not movingBatch failureCheck browser console for errors

Verify Generated Files

Bash
# Check generated files
ls -la /usr/share/freeswitch/sounds/en/us/custom_voice/

# Check specific path
ls -la /usr/share/freeswitch/sounds/en/us/custom_voice/ivr/

# Verify file format
file /usr/share/freeswitch/sounds/en/us/custom_voice/ivr/welcome.wav

Check Voice Guide in Database

Sql
-- List all voice guides
SELECT name, language_code, dialect_code, voice_name, is_system, is_fallback 
FROM public.voice_guides;

-- Check contents of a specific guide
SELECT vg.name, vgc.path, vgc.name as filename, vgc.phrase
FROM public.voice_guides vg
JOIN public.voice_guide_contents vgc ON vgc.voice_guide_id = vg.id
WHERE vg.name = 'English Emma';

---

9. Glossary

TermDefinition
Voice GuideCollection of voice prompts with a specific language/dialect/voice
DialectRegional language variant (US, UK, MX)
Voice NameIdentifier for the voice directory (e.g., "emma", "custom_ivr")
TTS ProfileAI profile configured for text-to-speech generation
is_systemFlag indicating protected system voice guides
is_fallbackFlag indicating the default fallback voice guide
Batch ProcessingGenerating prompts in groups of 10 for efficiency
Sound PathFreeSWITCH directory path for voice files
---

Lua Script Status ℹ️

Voice Guide Module Components

ComponentStatus
Voice Guide Listℹ️ Catalog viewer - reads from database
Voice Guide Form✅ Creates/edits guides via API
TTS Generation✅ Uses AI Profiles for audio synthesis
File Storage✅ Saves to FreeSWITCH sounds directory
Deletion Protection✅ is_system flag blocks deletion
Voice guides are used by Lua handlers (IVR, voicemail, etc.) when playing audio. The sound_path column defines the base path for FreeSWITCH's playback() function.

---

Documentation last updated: January 2026
AI Assistant

👋 Hello! I'm your Ring2All documentation assistant. I can help you find information about configuring and using the Ring2All PBX platform.

How can I help you today?