Skip to content

Commit 170d8f1

Browse files
committed
Release v3.2.8: Docker bind fix, docs & version bump
Containers now bind to 0.0.0.0 by default for reliable port mapping, resolving WebSocket and HTTP 502 issues in Docker. Documentation (EN/ZH) updated with HOST override guidance. UI, health endpoints, translations, and package metadata updated to v3.2.8 for consistent version reporting and release prep.
1 parent 72445db commit 170d8f1

File tree

10 files changed

+61
-38
lines changed

10 files changed

+61
-38
lines changed

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,18 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [3.2.8] - 2025-09-16
9+
10+
### 🐳 Docker Reliability Improvements
11+
12+
- Containers now bind to `0.0.0.0` by default when running under Docker, resolving WebSocket startup loops and HTTP 502 errors when exposing port 8000.
13+
- Health endpoints and UI badges report the correct v3.2.8 identifier so deployments reflect the running build instantly.
14+
15+
### 📘 Documentation & Release Prep
16+
17+
- README (EN/ZH) updated with guidance for overriding the bind host via the `HOST` environment variable.
18+
- Package metadata, translations, and distribution manifests bumped for the v3.2.8 Python and container releases.
19+
820
## [3.2.3] - 2025-06-27
921

1022
### 🔄 Enhanced OpenAI API Compatibility

README.md

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,10 @@ docker run -p 8000:8000 ghcr.io/dbccccccc/ttsfm:latest
7777
docker run -p 8000:8000 dbcccc/ttsfm:latest
7878
```
7979

80+
The container now binds to `0.0.0.0` by default so the mapped port is reachable
81+
from your host immediately. You can still override the bind address by setting
82+
the `HOST` environment variable if you need to lock it down further.
83+
8084
**Available endpoints:**
8185
- 🌐 **Web Interface**: http://localhost:8000
8286
- 🔗 **OpenAI API**: http://localhost:8000/v1/audio/speech
@@ -547,7 +551,7 @@ services:
547551
|----------|-------|-------------|
548552
| GitHub Container Registry | `ghcr.io/dbccccccc/ttsfm:latest` | Latest stable release |
549553
| Docker Hub | `dbcccc/ttsfm:latest` | Mirror on Docker Hub |
550-
| GitHub Container Registry | `ghcr.io/dbccccccc/ttsfm:v3.2.2` | Specific version |
554+
| GitHub Container Registry | `ghcr.io/dbccccccc/ttsfm:v3.2.8` | Specific version |
551555

552556
## 🛠️ Advanced Usage
553557

@@ -742,18 +746,12 @@ These remain accessible without authentication:
742746

743747
See [CHANGELOG.md](CHANGELOG.md) for detailed version history.
744748

745-
### Latest Changes (v3.2.3)
746-
747-
- ✨ **Auto-Combine by Default**: Long text is now automatically split and combined into single audio files
748-
- 🔄 **Unified API Endpoint**: Single `/v1/audio/speech` endpoint handles both short and long text intelligently
749-
- 🎛️ **Configurable Behavior**: New `auto_combine` parameter (default: `true`) for full control
750-
- 🤖 **Enhanced OpenAI Compatibility**: Drop-in replacement with intelligent long-text handling
751-
- 📊 **Rich Response Headers**: `X-Auto-Combine`, `X-Chunks-Combined`, and processing metadata
752-
- 🧹 **Streamlined Web Interface**: Removed legacy batch processing for cleaner user experience
753-
- 📖 **Simplified Documentation**: Web docs emphasize modern auto-combine approach
754-
- 🎮 **Enhanced Playground**: Clean interface focused on auto-combine functionality
755-
- 🔐 **API Key Protection**: Optional OpenAI-compatible authentication for secure deployments
756-
- 🛡️ **Security Features**: Comprehensive access control with detailed logging
749+
### Latest Changes (v3.2.8)
750+
751+
- 🐳 **Docker-Ready Defaults**: Containers now bind to `0.0.0.0` automatically, fixing WebSocket startup loops and HTTP 502 errors when port-mapped.
752+
- 📘 **Docs Refreshed**: README guidance highlights the new default and shows how to override the bind address with the `HOST` environment variable.
753+
- 🌐 **UI Version Sync**: Web badges, health endpoint metadata, and translations display v3.2.8 so users always see the running release.
754+
- 🧪 **Release Prep**: Package metadata and distribution manifests updated for the v3.2.8 PyPI and image rollout.
757755

758756
## 🤝 Support & Community
759757

README.zh.md

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,9 @@ docker run -p 8000:8000 ghcr.io/dbccccccc/ttsfm:latest
7777
docker run -p 8000:8000 dbcccc/ttsfm:latest
7878
```
7979

80+
容器现在默认监听 `0.0.0.0`,因此端口映射会立即对宿主机开放。如需限制
81+
监听地址,可以通过设置 `HOST` 环境变量进行覆盖。
82+
8083
**可用端点:**
8184
- 🌐 **Web界面**: http://localhost:8000
8285
- 🔗 **OpenAI API**: http://localhost:8000/v1/audio/speech
@@ -545,7 +548,7 @@ services:
545548
|----------|-------|-------------|
546549
| GitHub Container Registry | `ghcr.io/dbccccccc/ttsfm:latest` | 最新稳定版本 |
547550
| Docker Hub | `dbcccc/ttsfm:latest` | Docker Hub镜像 |
548-
| GitHub Container Registry | `ghcr.io/dbccccccc/ttsfm:v3.2.2` | 特定版本 |
551+
| GitHub Container Registry | `ghcr.io/dbccccccc/ttsfm:v3.2.8` | 特定版本 |
549552

550553
## 🛠️ 高级用法
551554

@@ -740,18 +743,12 @@ curl -X POST http://localhost:8000/v1/audio/speech \
740743

741744
查看[CHANGELOG.md](CHANGELOG.md)了解详细版本历史。
742745

743-
### 最新更改(v3.2.3)
744-
745-
- ✨ **默认自动合并**:长文本现在自动分割并合并为单个音频文件
746-
- 🔄 **统一API端点**:单个`/v1/audio/speech`端点智能处理短文本和长文本
747-
- 🎛️ **可配置行为**:新的`auto_combine`参数(默认:`true`)提供完全控制
748-
- 🤖 **增强OpenAI兼容性**:具有智能长文本处理的直接替代品
749-
- 📊 **丰富响应头**:`X-Auto-Combine`、`X-Chunks-Combined`和处理元数据
750-
- 🧹 **简化Web界面**:移除传统批处理,提供更清洁的用户体验
751-
- 📖 **简化文档**:Web文档强调现代自动合并方法
752-
- 🎮 **增强试用平台**:专注于自动合并功能的清洁界面
753-
- 🔐 **API密钥保护**:用于安全部署的可选OpenAI兼容身份验证
754-
- 🛡️ **安全功能**:具有详细日志的全面访问控制
746+
### 最新更改(v3.2.8)
747+
748+
- 🐳 **Docker 默认监听升级**:容器自动绑定 `0.0.0.0`,解决端口映射后 WebSocket 长时间“Starting”及 HTTP 502 的问题。
749+
- 📘 **文档同步更新**:README 新增说明,展示如何通过 `HOST` 环境变量重写绑定地址。
750+
- 🌐 **界面版本同步**:Web 徽章、健康检查和多语言文案均更新为 v3.2.8,方便快速确认运行版本。
751+
- 🧪 **发布就绪**:包元数据与分发清单已对齐,为 v3.2.8 的 PyPI 与镜像发布做好准备。
755752

756753
## 🤝 支持和社区
757754

ttsfm-web/app.py

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,23 @@
5353
CORS(app)
5454

5555
# Configuration (moved up for socketio initialization)
56-
HOST = os.getenv("HOST", "localhost")
56+
57+
58+
def _default_host() -> str:
59+
"""Choose a sensible default bind host.
60+
61+
Docker containers need to listen on all interfaces so port mappings work,
62+
while local installs can continue to use localhost.
63+
"""
64+
65+
# Common indicator that we're running inside a Docker container
66+
if os.path.exists("/.dockerenv"):
67+
return "0.0.0.0"
68+
69+
return "localhost"
70+
71+
72+
HOST = os.getenv("HOST", _default_host())
5773
PORT = int(os.getenv("PORT", "8000"))
5874
DEBUG = os.getenv("DEBUG", "false").lower() == "true"
5975

@@ -669,7 +685,7 @@ def get_status():
669685
return jsonify({
670686
"status": "online",
671687
"tts_service": "openai.fm (free)",
672-
"package_version": "3.2.3",
688+
"package_version": "3.2.8",
673689
"timestamp": datetime.now().isoformat()
674690
})
675691

@@ -687,7 +703,7 @@ def health_check():
687703
"""Simple health check endpoint."""
688704
return jsonify({
689705
"status": "healthy",
690-
"package_version": "3.2.3",
706+
"package_version": "3.2.8",
691707
"timestamp": datetime.now().isoformat()
692708
})
693709

ttsfm-web/templates/base.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@
8888
<a class="navbar-brand" href="{{ url_for('index') }}">
8989
<i class="fas fa-microphone-alt me-2"></i>
9090
<span class="fw-bold">TTSFM</span>
91-
<span class="badge bg-primary ms-2 small">v3.2.2</span>
91+
<span class="badge bg-primary ms-2 small">v3.2.8</span>
9292
</a>
9393

9494
<button class="navbar-toggler border-0" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
@@ -159,7 +159,7 @@
159159
<div class="d-flex align-items-center">
160160
<i class="fas fa-microphone-alt me-2 text-primary"></i>
161161
<strong class="text-dark">TTSFM</strong>
162-
<span class="ms-2 text-muted">v3.2.2</span>
162+
<span class="ms-2 text-muted">v3.2.8</span>
163163
</div>
164164
</div>
165165
<div class="col-md-6 text-md-end">

ttsfm-web/templates/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ <h5 class="fw-bold">{{ _('home.feature_free_title') }}</h5>
6363
<div class="feature-icon text-white rounded-circle d-inline-flex align-items-center justify-content-center mb-3" style="width: 4rem; height: 4rem; background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);">
6464
<i class="fas fa-magic"></i>
6565
</div>
66-
<h5 class="fw-bold">{{ _('home.feature_openai_title') }} <span class="badge bg-success ms-1">v3.2.3</span></h5>
66+
<h5 class="fw-bold">{{ _('home.feature_openai_title') }} <span class="badge bg-success ms-1">v3.2.8</span></h5>
6767
<p class="text-muted">{{ _('home.feature_openai_desc') }}</p>
6868
</div>
6969
</div>

ttsfm-web/translations/en.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,8 @@
152152
"feature_auto_combine": "Auto-combine feature - Automatically handles long text (>4096 chars) by splitting and combining audio",
153153
"feature_validation": "Text length validation - Smart validation with configurable limits",
154154
"feature_monitoring": "Real-time monitoring - Status endpoints and health checks",
155-
"new_version": "New in v3.2.3:",
156-
"new_version_desc": "Enhanced `/v1/audio/speech` endpoint with intelligent auto-combine feature. Streamlined web interface with clean, user-friendly design and automatic long-text handling!",
155+
"new_version": "New in v3.2.8:",
156+
"new_version_desc": "Docker images now bind to 0.0.0.0 automatically, fixing localhost-only launches and 502 errors. Docs were refreshed with Host override guidance for locked-down deployments.",
157157
"authentication_title": "Authentication",
158158
"authentication_desc": "Currently, the API supports optional API key authentication. If configured, include your API key in the request headers.",
159159
"text_validation_title": "Text Length Validation",

ttsfm-web/translations/zh.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,8 @@
152152
"feature_auto_combine": "自动合并功能 - 自动处理长文本(>4096字符),通过分割和合并音频",
153153
"feature_validation": "文本长度验证 - 智能验证,可配置限制",
154154
"feature_monitoring": "实时监控 - 状态端点和健康检查",
155-
"new_version": "v3.2.3新功能",
156-
"new_version_desc": "增强的`/v1/audio/speech`端点,具有智能自动合并功能。简化的Web界面,设计简洁、用户友好,自动处理长文本!",
155+
"new_version": "v3.2.8新功能",
156+
"new_version_desc": "Docker 镜像默认监听 0.0.0.0,解决仅限 localhost 导致的 502 问题;文档同步更新,说明如何通过 `HOST` 环境变量自定义监听地址。",
157157
"authentication_title": "身份验证",
158158
"authentication_desc": "目前,API支持可选的API密钥身份验证。如果已配置,请在请求头中包含您的API密钥。",
159159
"text_validation_title": "文本长度验证",

ttsfm/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
split_text_by_length
6363
)
6464

65-
__version__ = "3.2.3"
65+
__version__ = "3.2.8"
6666
__author__ = "dbcccc"
6767
__email__ = "[email protected]"
6868
__description__ = "Text-to-Speech API Client with OpenAI compatibility"

uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)