{"id":30290293,"url":"https://github.com/ryo08271154/voice_control","last_synced_at":"2025-08-16T23:12:17.011Z","repository":{"id":296402648,"uuid":"937500661","full_name":"ryo08271154/voice_control","owner":"ryo08271154","description":"音声操作でスマートデバイスを操作できるPython製アプリケーションです。","archived":false,"fork":false,"pushed_at":"2025-08-10T13:07:14.000Z","size":157,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-10T14:31:24.379Z","etag":null,"topics":["chromecast","flet","mcp","mcp-client","python","raspberry-pi","raspberrypi","smart-home","smarthome","switchbot-api","voice-assistant","voice-control","vosk"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ryo08271154.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-02-23T07:51:34.000Z","updated_at":"2025-08-10T13:04:16.000Z","dependencies_parsed_at":"2025-08-03T05:31:59.284Z","dependency_job_id":null,"html_url":"https://github.com/ryo08271154/voice_control","commit_stats":null,"previous_names":["ryo08271154/voice_control"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/ryo08271154/voice_control","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryo08271154%2Fvoice_control","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryo08271154%2Fvoice_control/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryo08271154%2Fvoice_control/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryo08271154%2Fvoice_control/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ryo08271154","download_url":"https://codeload.github.com/ryo08271154/voice_control/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryo08271154%2Fvoice_control/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270781393,"owners_count":24643820,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-16T02:00:11.002Z","response_time":91,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chromecast","flet","mcp","mcp-client","python","raspberry-pi","raspberrypi","smart-home","smarthome","switchbot-api","voice-assistant","voice-control","vosk"],"created_at":"2025-08-16T23:12:16.414Z","updated_at":"2025-08-16T23:12:17.003Z","avatar_url":"https://github.com/ryo08271154.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 音声操作アプリケーション\n\n## 概要\n音声コマンドを使用してさまざまなデバイスを操作したり、Geminiに質問したりすることができます。\n\n## 特徴\n- **デバイス操作**: 照明、テレビ、エアコンなどのスマートデバイスを声で制御できます。\n- **メディア制御**: Chromecastのメディアの再生、一時停止、などが可能です。\n- **情報検索**: 現在時刻、日付、天気予報などを声で確認できます。\n- **AI対話**: Geminiが質問に答えたり、会話をしたりすることができます。また、MCPサーバーを利用することで、外部ツールやサービスとの連携も可能です。\n- **カスタマイズ可能**: カスタムデバイス、シーン、ルーチンを定義して、独自の音声コマンドを作成できます。\n- **オフライン音声認識**: VOSKまたはWhisperを使用できるため、音声認識はオフラインで動作します。\n\n## インストール手順\n1. リポジトリをクローンします。\n   ```bash\n   git clone https://github.com/ryo08271154/voice_control.git\n   cd voice_control\n   ```\n\n2. 必要なライブラリをインストールします。\n   ```bash\n   pip install -r requirements.txt\n   ```\n\n3. 日本語音声認識モデルをダウンロードする。\n   - **VOSKを使用する場合**:\n   1. [VOSKモデルページ](https://alphacephei.com/vosk/models)から日本語音声認識モデルをダウンロード\n   2. ダウンロードしたファイルを解凍\n   3. 解凍したフォルダを任意の場所に配置\n   モデルのパスは後でedit_config.pyの設定時に指定します。\n   - **Whisperを使用する場合**:\n    1. Whisperのモデルをダウンロードする必要はありません。Whisperは自動的にモデルをダウンロードします。\n\n4. アプリケーションの設定を行います。\n   ```bash\n   python edit_config.py\n   ```\n   以下の情報の入力を求められます：\n   - 使用する音声認識エンジン（VOSKまたはWhisper）\n   - VOSKモデルのパス（VOSKを使用する場合）\n   - Whisperのモデル名またはモデルのパス（Whisperを使用する場合）\n   - Gemini APIキー\n   - Geminiモデル名\n   - Geminiシステム指示\n   - Genius APIトークン （歌詞表示機能を使用する場合は必要）\n   - [音声読み上げサーバーURL](https://github.com/ryo08271154/voice_control_server)\n   - 使用するプラグインの選択と設定\n\n   設定が完了すると、`config/config.json`が自動的に作成されます。\n   - **MCPの設定（任意）**:\n      GeminiでMCPを使用する場合、`config/config.json`に手動で追加する必要があります。\n     ```json\n     {\n       \"mcpServers\": {\n\n       }\n     }\n     ```\n\n5. 必要に応じて、カスタムデバイスやシーンなどを設定できます。\n   `config`ディレクトリ内の以下のJSONファイルを編集してください：\n\n   - **`custom_scenes.json`**: カスタムシーンの設定\n     ```json\n     {\n       \"sceneList\": [\n         {\n           \"sceneName\": \"シーン名\",\n           \"command\": \"実行するコマンド\"\n         }\n       ]\n     }\n     ```\n\n   - **`custom_devices.json`**: カスタムデバイスの設定\n     ```json\n     {\n       \"deviceList\": [\n         {\n           \"deviceName\": \"デバイス名\",\n           \"turnOn\": \"オンにするコマンド\",\n           \"turnOff\": \"オフにするコマンド\"\n         }\n       ]\n     }\n     ```\n   - **`custom_routines.json`**: カスタムルーチンの設定\n     ```json\n     {\n       \"routineList\": [\n         {\n           \"routineName\": \"おはよう\",\n           \"commands\": [\n             \"ライトつけて\",\n             \"エアコンつけて\",\n             \"今日の天気は\"\n           ]\n         }\n       ]\n     }\n     ```\n\n## 使用方法\n\n### コマンドラインから実行\n```bash\npython voice_control.py\n```\n\n### GUIアプリケーションとして実行\n```bash\npython control.py\n```\n\n### 音声コマンド例\n以下は、音声コマンドの例です。このコマンド以外にもさまざまなコマンドが使えます。\n\n- **デバイスの操作**\n  - 「電気をつけて」：電気デバイスの電源をオンにします\n  - 「テレビを消して」：テレビの電源をオフにします\n  - 「エアコンをつけて」：エアコンをオンにします\n\n- **メディア操作（Chromecast）**\n  - 「再生して」：メディアの再生を開始します\n  - 「一時停止して」：メディアを一時停止します\n  - 「停止して」：メディアを停止します\n  - 「音量を上げて」：音量を上げます\n  - 「音量を下げて」：音量を下げます\n  - 「10秒戻して」：10秒巻き戻します\n  - 「30秒スキップして」：30秒早送りします\n\n- **時間や日付の確認**\n  - 「今何時？」：現在の時刻を教えてくれます\n  - 「今日は何日？」：現在の日付を教えてくれます\n\n- **天気情報の取得**\n  - 「今日の天気は？」：現在の天気情報を取得します\n  - 「明日の天気は？」：翌日の天気情報を取得します\n\n- **AI対話**\n  - 「○○とは何ですか？」：様々な質問にAIが回答します\n\n## 必要なAPIキー\n必須:\n- **Google Generative AI (Gemini)**: AI対話機能に使用\n\n任意:\n- **OpenWeatherMap API**: 天気情報の取得機能を使用する場合に必要\n- **SwitchBot API**: SwitchBotデバイスを制御する場合に必要\n- **Genius API**: 歌詞表示機能を使用する場合に必要\n\n## 操作対応デバイス\n- SwitchBot対応デバイス（ライト、テレビ、エアコンなど）\n- Chromecast（メディア再生、音量制御）\n- カスタムデバイス（コマンドライン経由で制御可能なデバイス）\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryo08271154%2Fvoice_control","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fryo08271154%2Fvoice_control","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryo08271154%2Fvoice_control/lists"}