キャラクターカード(PNG 画像に埋め込まれたメタデータ)を生成 AI で翻訳するクロスプラットフォームアプリケーションです。
- 自動抽出: PNG 画像からキャラクターデータを自動的に抽出
- AI 翻訳: Ollama または OpenAI 互換 API を経由して任意の翻訳モデルを使用
- 固有名詞の一貫性: キャラクター名を先に翻訳し、説明・性格・会話例を参照して人物名や用語の訳揺れを抑制
- 並列表示: 原文と翻訳文を左右/上下分割で比較可能
- マルチバージョン: Character Card V1/V2/V3 仕様に対応
- ストリーミング: 翻訳結果をリアルタイムで表示
- 設定保存: AI 接続情報とプロンプトを永続化
- Java: 25 以上が必要
- プラットフォーム: Windows, macOS, Linux(Java が動作する環境)
- ネイティブイメージ: 今後対応予定(exe, dmg など)
# リポジトリのクローン
git clone https://github.com/k7t3/character-translator.git
cd character-translator
# ビルド
./gradlew build
# アプリ実行
./gradlew run注: 実行イメージを作成する場合は
./gradlew jlinkを実行してください。
- アプリ起動後、右上の⚙️設定ボタンをクリック
- AI プロバイダーを選択:
- Ollama: ローカル LLM サーバー
- OpenAI Compatible: LM Studio, vLLM, KoboldCPP など
- 接続情報を入力:
項目 Ollama OpenAI Compatible ホスト/URL localhostベース URL(例: https://api.openai.com/v1)ポート 11434- モデル名 使用するモデル名(例: translate-gemma)モデル名 タイムアウト 秒単位(例: 60)秒単位(例: 60)API キー - 必要な場合のみ入力 - 接続テストで設定を確認
- 保存をクリック
- 「カードを開く」ボタンで PNG ファイルを選択、またはウィンドウにドラッグ&ドロップ
- 左ペインにキャラクター画像と名前のプレビューが表示されます
- 右ペインのフィールドリストから翻訳対象を確認
- 翻訳ボタンをクリック
- キャラクター名が未編集の場合は最初にキャラクター名を翻訳し、その後の各フィールド翻訳ではキャラクター名に加えて説明・性格・会話例を参照して固有名詞の一貫性を保ちます
- ストリーミングで翻訳結果が表示されます(キャンセル可能)
- 原文・翻訳文を並列表示して比較できます
翻訳完了後、エクスポートボタンで翻訳済みキャラクターカードを PNG として保存します。
| バージョン | チャンクキー |
|---|---|
| V1 | chara |
| V2 | chara |
| V3 | ccv3 |
- 説明(Description)
- 性格(Personality)
- シナリオ(Scenario)
- 最初のメッセージ(First Message)
- 会話例(Message Examples)
- クリエイターノート(Creator Notes)
- システムプロンプト(System Prompt)
- 投稿後指示(Post History Instructions)
- 代替挨拶(Alternate Greetings)
- ニックネーム(Nickname、V3 のみ)
- グループ用挨拶(Group Only Greetings、V3 のみ)
| プロバイダー | 説明 |
|---|---|
| Ollama | ローカル LLM サーバー。プライバシー重視の環境に適しています。 |
| OpenAI Compatible | LM Studio, vLLM, KoboldCPP 等の互換 API サーバー |
Google のオープンモデル Gemma シリーズ(Gemma 3, Gemma 4, TranslateGemma)の使用を推奨します。
デフォルトのプロンプトは TranslateGemma に最適化されています(英語→日本語翻訳)。
システムプロンプト:
You are a professional translator specializing in English-to-Japanese translation.
Translate the provided text accurately, preserving all nuances and expressions without omission.
Guidelines:
- The text may contain special keywords such as `{{char}}` and `{{user}}` that are processed by the system.
Do not translate these keywords; include them as-is in your output.
- Preserve the original formatting of the text.
- Translate the text accurately and completely, without omitting any content.
ユーザープロンプトテンプレート:
You are a professional English (en) to Japanese (ja) translator.
Your goal is to accurately convey the meaning and nuances of the original
English text while adhering to Japanese grammar, vocabulary, and cultural sensitivities.
Produce only the Japanese translation, without any additional explanations or commentary.
Please translate the following English text into Japanese:
{{TEXT}}
デフォルトでは英語→日本語翻訳が設定されています。他の言語対で翻訳する場合は、設定画面のプロンプト編集で以下のように変更してください。
例:日本語→英語翻訳の場合
システムプロンプト:
You are a professional translator specializing in Japanese-to-English translation.
Translate the provided text accurately, preserving all nuances and expressions without omission.
Guidelines:
- The text may contain special keywords such as `{{char}}` and `{{user}}` that are processed by the system.
Do not translate these keywords; include them as-is in your output.
- Preserve the original formatting of the text.
- Translate the text accurately and completely, without omitting any content.
ユーザープロンプトテンプレート:
You are a professional Japanese (ja) to English (en) translator.
Your goal is to accurately convey the meaning and nuances of the original
Japanese text while adhering to English grammar, vocabulary, and cultural sensitivities.
Produce only the English translation, without any additional explanations or commentary.
Please translate the following Japanese text into English:
{{TEXT}}
他の言語対(例:英語→中国語、フランス語→ドイツ語など)でも同様に、プロンプト内の言語指定と指示文を適宜変更してください。
注: プロンプトは設定画面でカスタマイズ可能です。デフォルトに戻す場合は「デフォルトにリセット」ボタンを使用してください。
MIT License
