fix: Go Docker — Debian化 + ORT修正 + OpenJTalk日本語G2P + serveサブコマンド - #332
Merged
Conversation
…ンド (#331) ## Dockerfile修正 - Alpine (musl) → Debian (glibc) に変更し ORT 互換性を確保 - ORT v1.21.0 (存在しない) → v1.24.4 (go-ci.yml と統一) - URL 命名規則を x86_64 → x64 に修正 - pyopenjtalk-plus から OpenJTalk を CMake ビルドし -tags openjtalk で日本語G2P有効化 - MeCab 辞書をイメージに同梱 ## serve サブコマンド追加 - piper-plus serve -m model.onnx --addr :8080 で HTTP TTS サーバー起動 - 共有フラグ (--model, --config, --device 等) を PersistentFlags に移動 - エンドポイント: /synthesize, /health, /info ## テスト・CI - serve_test.go: Cobra コマンド構造のユニットテスト (5テスト) - go-ci.yml: docker-build ジョブ追加 (PR時にDockerイメージビルド検証)
There was a problem hiding this comment.
Pull request overview
This PR updates the Go distribution packaging and CLI to better support ONNX Runtime (glibc) and adds an HTTP “serve” mode for running Piper Plus as a TTS server.
Changes:
- Switch Go Docker image from Alpine to Debian, bundle ONNX Runtime v1.24.4, and build/bundle OpenJTalk (Japanese G2P) assets.
- Add
piper-plus servesubcommand (HTTP endpoints:/synthesize,/health,/info) plus basic Cobra command-structure tests. - Move shared CLI flags to Cobra
PersistentFlagsand add a Docker build job to Go CI.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
src/go/docker/Dockerfile |
Debian-based multi-stage build; downloads ORT and builds OpenJTalk + bundles dictionary. |
src/go/cmd/piper-plus/serve.go |
New serve subcommand that starts an HTTP TTS server. |
src/go/cmd/piper-plus/serve_test.go |
New tests validating Cobra command wiring/flags for serve. |
src/go/cmd/piper-plus/main.go |
Moves common flags to PersistentFlags and registers serve command. |
.github/workflows/go-ci.yml |
Adds docker-build job that builds the Go Docker image in CI. |
src/go/README.md |
Updates Docker documentation to match the Debian/ORT/OpenJTalk approach. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Dockerfile: OPENJTALK_DIC_DIR → OPENJTALK_DICTIONARY_PATH (Goコードが実際に読む変数名) - Dockerfile: 辞書パスを /usr/share → /usr/local/share に修正 (exe-relative Tier 2 と一致) - Dockerfile: pyopenjtalk-plus と ORT の SHA-256 チェックサム検証を追加 - serve.go: SIGTERM ハンドリング追加 (Docker/K8s 対応) - serve.go: http.Server.Shutdown() による graceful shutdown 実装 - serve_test.go: TestServeCmd_RequiresModel → TestServeCmd_RunESet にリネーム
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
go-ci.ymlと統一) に修正-tags openjtalkで日本語G2P を有効化(辞書同梱)piper-plus serveサブコマンドを追加(HTTP TTS サーバー:/synthesize,/health,/info)PersistentFlagsに移動してサブコマンド間で共有Changed files
src/go/docker/Dockerfilesrc/go/cmd/piper-plus/serve.goserveサブコマンド (graceful shutdown対応)src/go/cmd/piper-plus/serve_test.gosrc/go/cmd/piper-plus/main.goserveCmd登録.github/workflows/go-ci.ymldocker-buildジョブ追加src/go/README.mdTest plan
go-ci.ymlunit-test (3 OS) で serve_test.go のテストが通ることgo-ci.ymldocker-build で Dockerfile のビルドが成功することgo-ci.ymlbuild (3 OS) で serve.go を含むバイナリビルドが成功することgo-ci.ymllint が通ること