🏆 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¶
- 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. - Silero Neural TTS Engine: Added native support for Silero TTS (PyTorch V3), enabling compact, air-gapped, high-performance voice generation across 6 language families.
- Dynamic Model Discovery &
/languagesAPI: Introduced live on-disk model scanning that exposes available voice weights, native language names, and country flag emojis. - Multilingual Web UI with RTL Support: Integrated
Flask-Babelwith directional RTL stylesheets (Arabic, Hebrew) and translations for German, Spanish, French, Italian, and English. - Operator Workflow Enhancements: Added bulk call acknowledgment, hardened individual call acknowledgment, incident audit reporting, and interactive audio preview.
- Enterprise Telephony Resilience: Introduced Asterisk ARI Circuit Breakers, Redis distributed locking, and Celery priority emergency routing (
p0_emergency). - 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.
- Offline PyTorch V3 model support (
- 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.
- Inspects
- 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.
- Replaced nested conditionals with the Strategy Pattern (
- Fine-Grained Controls & Language-Scoped Caching:
speedparameter for controlling speech delivery rate (0.85to1.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.
- Seamless locale switcher supporting English (
- 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_premiseUSB 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.
- Informative tooltips for SMS carriers (
2.3 Telephony & Core System Resilience¶
- Asterisk ARI Circuit Breaker:
- Monitors ARI communication failures. Automatically trips to
OPENstate upon repeated communication timeouts, protecting upstream services and logging clear incident diagnostics.
- Monitors ARI communication failures. Automatically trips to
- Distributed Locking:
- Integrated
redis_lockutility ensuring multi-instance deployments do not execute competing recaller loops or conflicting database writes.
- Integrated
- Celery Priority Routing:
- High-priority emergency alerts are routed to the dedicated
p0_emergencyqueue, ensuring urgent voice calls preempt background recall tasks.
- High-priority emergency alerts are routed to the dedicated
- Unified Telemetry:
- Standardized OpenTelemetry metrics and health probes (
/health,/healthz,/live,/metrics) across all HTTP microservices.
- Standardized OpenTelemetry metrics and health probes (
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 (RK3588aarch64) 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 optionalsms_phone_number(dedicated cellular SMS), withphone=oncallautomatic resolution and RFC 3428 SIPMESSAGE(asterisk_sip) delivery & failover via Asterisk ARI. - Always-UCS-2 UTF-8 & 70-Unit Multipart GSM SMS: Both
py_phone_caller_utils(rust_engine) andopenalertdtransmit 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 (
openalertdv1.0.0) Off-Grid Mesh Bridge: Native Rust daemon bridging LoRa 868 MHz RF, BitChat BLE (with BlueZ/Spreadtrum HCI self-healing and cleanSIGTERMteardown),/sosWi-Fi Captive Portal, Nostr (NIP-ALERTKind 30000, NIP-57 Zaps, 0xChat NIP-17 E2EE C2, Embedded Relay:8088), and LAN UDP peering tocaller_prometheus_webhook(:8084/sms_before_call). - Modular Deployment Hub (
deploy/docs/) & Ready-to-Use Local SIP Extension1000: Consolidated Ansible installer (deploy/ansible/site.yml), Docker/Podman Compose, Kubernetes + Helm v3, native.deb/.rpmpackages, PyPI wheels +systemd, ARM64 air-gapped appliance packaging, and optionalasterisk_sip_exten_1000_enabled: trueprovisioning with random password generation logged on execution.
5. Upgrade Guide¶
-
Pull Latest Code:
-
Update Dependencies via
uv: -
Configuration:
settings.tomlunder[generate_audio]supports Silero fields (silero_lang,silero_speaker,[generate_audio.preload]).[caller_address_book]andpy_phone_caller_uiautomatically handle thesms_phone_numbercolumn via Piccolo migrations incaller_register.
- Deploy:
- Native Ansible (Recommended): Follow
deploy/docs/02-ansible-deployment.md(cd deploy/ansible && ansible-playbook -i /secure/inventory/hosts.yml site.yml --ask-vault-pass). - Docker / Podman Compose: Follow
deploy/docs/03-docker-compose-deployment.md. - Kubernetes / Helm / DEB / RPM / ARM64 Air-Gapped: See
deploy/docs/README.md.
- Native Ansible (Recommended): Follow