Skip to content

🏆 py-phone-caller 1.0.1 Release Notes & Enhancement Report

1. Executive Summary

py-phone-caller v1.0.1 is a major feature and reliability release that significantly expands the platform's Text-to-Speech capabilities, user interface internationalization, and telephony resilience.

Following the initial 1.0.0 release, version 1.0.1 focuses on modular code architecture, cross-engine multi-language synthesis, high-availability safeguards, and an upgraded operational experience for on-call engineers.

🌟 Release Highlights

  1. Modular Architecture for generate_audio: Decomposed the monolithic ~1,250-line service into clean, single-responsibility submodules (enums, languages, runners, discovery, strategies, preloading, generate_audio) using the Strategy Pattern.
  2. Silero Neural TTS Engine: Added native support for Silero TTS (PyTorch V3), enabling compact, air-gapped, high-performance voice generation across 6 language families.
  3. Dynamic Model Discovery & /languages API: Introduced live on-disk model scanning that exposes available voice weights, native language names, and country flag emojis.
  4. Multilingual Web UI with RTL Support: Integrated Flask-Babel with directional RTL stylesheets (Arabic, Hebrew) and translations for German, Spanish, French, Italian, and English.
  5. Operator Workflow Enhancements: Added bulk call acknowledgment, hardened individual call acknowledgment, incident audit reporting, and interactive audio preview.
  6. Enterprise Telephony Resilience: Introduced Asterisk ARI Circuit Breakers, Redis distributed locking, and Celery priority emergency routing (p0_emergency).
  7. Comprehensive Test Suite: Test coverage expanded from 55 to 215 automated tests (uv run pytest), all passing cleanly.

2. Key Enhancements by Subsystem

2.1 Text-to-Speech (TTS) Architecture & Engine Expansion

The generate_audio service has undergone a complete architectural overhaul:

src/generate_audio/
├── enums.py          # TTSEngine enum and settings configuration resolution
├── languages.py      # Language names, Unicode flags, aliases, Kokoro voice prefixes
├── runners.py        # Dedicated CLI subprocess wrappers (Piper, Kokoro, Silero)
├── discovery.py      # On-disk model directory scanners and language catalog builders
├── strategies.py     # Strategy dispatch dictionary and TTS synthesis coordinator
├── preloading.py     # Automatic startup preloading and model verification
└── generate_audio.py # aiohttp HTTP application coordinator, routes, and backward-compat exports

New Features:

  • Silero TTS Integration:
    • Offline PyTorch V3 model support (v3_en.pt, v3_es.pt, v3_de.pt, v3_fr.pt, v3_ru.pt, v3_indic.pt).
    • Ultra-compact footprint (~50 MB per model) ideal for resource-constrained edge gateways.
    • Automatic download and model verification on service startup.
  • Dynamic Model Discovery (GET /languages):
    • Inspects pre_trained_models/ on disk for installed weights and voice checkpoints across all engines.
    • Exposes active engine defaults and installed offline alternatives.
  • Intelligent Engine & Language Routing:
    • Replaced nested conditionals with the Strategy Pattern (TTS_DISPATCH_STRATEGIES).
    • Resolves language aliases (e.g. spa ↔ es, ita ↔ it, eng ↔ en).
    • Cross-engine fallback: if the active engine lacks weights for a requested language, the resolver delegates to an installed offline engine that supports it.
  • Fine-Grained Controls & Language-Scoped Caching:
    • speed parameter for controlling speech delivery rate (0.85 to 1.2).
    • Language-scoped cache filenames ({msg_chk_sum}_{lang}.wav) preventing collision across languages while maintaining exact backward compatibility ({msg_chk_sum}.wav).
    • Asynchronous WAV RIFF header and non-zero byte size validation.

2.2 Multilingual Web UI & Operator Experience

  • Internationalization (Flask-Babel):
    • Seamless locale switcher supporting English (en), Spanish (es), German (de), French (fr), Italian (it), Arabic (ar), and Hebrew (he).
    • Full Right-to-Left (RTL) layout rendering with specialized CSS font rules and directional padding for Arabic and Hebrew.
  • Dynamic Audio Preview:
    • Operators can preview alert voice messages directly in the browser using the active TTS engine and selected language before placing calls.
  • Incident Audit Reports & Bulk Operations:
    • Bulk acknowledge action for handling alert storms with a single click.
    • Hardened individual call acknowledgment with client-side defensive error trapping.
    • Incident audit report generator exporting complete alert timelines for post-mortems.
  • SMS Interface Polish:
    • Informative tooltips for SMS carriers (on_premise USB modem vs. twilio).
    • Lifecycle stepper visualization in message details modal tracking dispatch states.
    • Quick toggle button for on-call operator coverage in the Address Book.

2.3 Telephony & Core System Resilience

  • Asterisk ARI Circuit Breaker:
    • Monitors ARI communication failures. Automatically trips to OPEN state upon repeated communication timeouts, protecting upstream services and logging clear incident diagnostics.
  • Distributed Locking:
    • Integrated redis_lock utility ensuring multi-instance deployments do not execute competing recaller loops or conflicting database writes.
  • Celery Priority Routing:
    • High-priority emergency alerts are routed to the dedicated p0_emergency queue, ensuring urgent voice calls preempt background recall tasks.
  • Unified Telemetry:
    • Standardized OpenTelemetry metrics and health probes (/health, /healthz, /live, /metrics) across all HTTP microservices.

3. Verification & Quality Assurance

3.1 Automated Test Execution

The automated test suite was expanded significantly to cover all new capabilities:

============================= test session starts ==============================
platform linux -- Python 3.14.6, pytest-9.1.1, pluggy-1.6.0
configfile: pytest.ini
collected 215 items
...
====================== 215 passed, 10 warnings in 21.76s =======================

3.2 Live Environment Validation

  • Target Environments: Verified across Debian 13 (trixie), Ubuntu 26.04 LTS (resolute), Rocky Linux 10.2 (SELinux Enforcing), Kubernetes (k3s / GKE + Helm v3), and physical Orange Pi 5 Plus (RK3588 aarch64) in both connected (online) and 100% air-gapped (airgapped) modes.
  • Full 12-Gate Validation: See deploy/docs/10-end-to-end-installation-validation.md.

4. Platform Capabilities Added Since 1.0.1

  • Dual-Channel Contact & Smart SMS/SIP Routing: Address Book contacts support both phone_number (voice/SIP extension or PSTN) and optional sms_phone_number (dedicated cellular SMS), with phone=oncall automatic resolution and RFC 3428 SIP MESSAGE (asterisk_sip) delivery & failover via Asterisk ARI.
  • Always-UCS-2 UTF-8 & 70-Unit Multipart GSM SMS: Both py_phone_caller_utils (rust_engine) and openalertd transmit all USB GSM SMS using UCS-2 16-bit Unicode encoding with clean 70 UTF-16 code-unit multipart splitting, eliminating GSM-7 charset corruption across cellular modems.
  • OpenAlert (openalertd v1.0.0) Off-Grid Mesh Bridge: Native Rust daemon bridging LoRa 868 MHz RF, BitChat BLE (with BlueZ/Spreadtrum HCI self-healing and clean SIGTERM teardown), /sos Wi-Fi Captive Portal, Nostr (NIP-ALERT Kind 30000, NIP-57 Zaps, 0xChat NIP-17 E2EE C2, Embedded Relay :8088), and LAN UDP peering to caller_prometheus_webhook (:8084/sms_before_call).
  • Modular Deployment Hub (deploy/docs/) & Ready-to-Use Local SIP Extension 1000: Consolidated Ansible installer (deploy/ansible/site.yml), Docker/Podman Compose, Kubernetes + Helm v3, native .deb/.rpm packages, PyPI wheels + systemd, ARM64 air-gapped appliance packaging, and optional asterisk_sip_exten_1000_enabled: true provisioning with random password generation logged on execution.

5. Upgrade Guide

  1. Pull Latest Code:

    git pull origin main
    
  2. Update Dependencies via uv:

    uv sync --all-packages
    
  3. Configuration:

    • settings.toml under [generate_audio] supports Silero fields (silero_lang, silero_speaker, [generate_audio.preload]).
    • [caller_address_book] and py_phone_caller_ui automatically handle the sms_phone_number column via Piccolo migrations in caller_register.
  4. Deploy: