# jihao2048/windows-speech-repair architecture

> Architecture diagram of the GitHub repository jihao2048/windows-speech-repair, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/jihao2048/windows-speech-repair
- Repository: https://github.com/jihao2048/windows-speech-repair

## Overview

This repository is a Windows 11 voice-typing troubleshooting and repair toolkit, centered on an administrator-run PowerShell script. The documented workflow diagnoses the failure, retrieves missing LKG system-app files from Windows installation media, restores them, adjusts speech and package state, then verifies recovery. The graph follows README-documented behavior; no script source excerpts were available, so internal call wiring and details beyond those documented are omitted.

Main entry points: [`Fix-Win11VoiceTyping.ps1`](https://github.com/jihao2048/windows-speech-repair/blob/main/Fix-Win11VoiceTyping.ps1) (One-click repair), [`scripts/iso-check.ps1`](https://github.com/jihao2048/windows-speech-repair/blob/main/scripts/iso-check.ps1) (Locate and mount media), [`scripts/wim-extract.ps1`](https://github.com/jihao2048/windows-speech-repair/blob/main/scripts/wim-extract.ps1) (Extract LKG packages), [`备份`](https://github.com/jihao2048/windows-speech-repair/tree/main/%E5%A4%87%E4%BB%BD) (Package backups)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Repair entry"]
  node_main["One-click repair"]
  node_guide["Repair guide<br/>[Win11语音键入故障排查指南.md]"]
  node_usage["Script instructions<br/>[一键脚本使用说明.md]"]
end

subgraph group_recovery["Package recovery"]
  node_iso["Locate and mount media<br/>[iso-check.ps1]"]
  node_extract["Extract LKG packages<br/>[wim-extract.ps1]"]
  node_backup["Package backups"]
  node_restore["Restore speech runtime"]
  node_register["Register packages<br/>[final-register.ps1]"]
end

subgraph group_system["System repair"]
  node_speech_config["Enable online speech<br/>[repair-speech.ps1]"]
  node_wu_repair["Windows Update repair"]
  node_verify["Post-repair verification<br/>[post-reboot.ps1]"]
end

subgraph group_investigation["Diagnostics and research"]
  node_diagnose["One-click diagnosis"]
  node_package_check["Package checks"]
  node_damage_check["Damage assessment<br/>[damage-scope.ps1]"]
  node_experiments["Registration experiments<br/>[minimal-test.ps1]"]
  node_reports["Repair reports"]
end

node_user(("Administrator"))
node_windows["Windows system"]
node_install_media["Windows install media"]

node_user -->|"consults"| node_guide
node_user -->|"runs"| node_main
node_user -->|"consults"| node_usage
node_main -->|"diagnoses and repairs"| node_windows
node_main -->|"locates and mounts"| node_install_media
node_install_media -->|"provides image"| node_iso
node_iso -->|"enables extraction"| node_extract
node_extract -->|"stores packages"| node_backup
node_backup -->|"supplies package files"| node_restore
node_main -->|"restores missing files"| node_restore
node_main -->|"enables speech recognition"| node_speech_config
node_main -->|"clears registration state"| node_register
node_main -->|"verifies recovery"| node_verify
node_main -.->|"repairs update state"| node_wu_repair
node_user -->|"runs diagnosis"| node_diagnose
node_diagnose -->|"checks package engine"| node_package_check
node_diagnose -->|"assesses damage"| node_damage_check
node_user -->|"runs experiments"| node_experiments
node_diagnose -->|"records findings"| node_reports

click node_main "https://github.com/jihao2048/windows-speech-repair/blob/main/Fix-Win11VoiceTyping.ps1"
click node_guide "https://github.com/jihao2048/windows-speech-repair/blob/main/docs/Win11%E8%AF%AD%E9%9F%B3%E9%94%AE%E5%85%A5%E6%95%85%E9%9A%9C%E6%8E%92%E6%9F%A5%E6%8C%87%E5%8D%97.md"
click node_usage "https://github.com/jihao2048/windows-speech-repair/blob/main/docs/%E4%B8%80%E9%94%AE%E8%84%9A%E6%9C%AC%E4%BD%BF%E7%94%A8%E8%AF%B4%E6%98%8E.md"
click node_iso "https://github.com/jihao2048/windows-speech-repair/blob/main/scripts/iso-check.ps1"
click node_extract "https://github.com/jihao2048/windows-speech-repair/blob/main/scripts/wim-extract.ps1"
click node_backup "https://github.com/jihao2048/windows-speech-repair/tree/main/%E5%A4%87%E4%BB%BD"
click node_restore "https://github.com/jihao2048/windows-speech-repair/blob/main/scripts/apply-speechruntime.ps1"
click node_register "https://github.com/jihao2048/windows-speech-repair/blob/main/scripts/final-register.ps1"
click node_speech_config "https://github.com/jihao2048/windows-speech-repair/blob/main/scripts/repair-speech.ps1"
click node_wu_repair "https://github.com/jihao2048/windows-speech-repair/blob/main/scripts/wu-fix-and-verify.ps1"
click node_verify "https://github.com/jihao2048/windows-speech-repair/blob/main/scripts/post-reboot.ps1"
click node_diagnose "https://github.com/jihao2048/windows-speech-repair/blob/main/Fix-Win11VoiceTyping.ps1"
click node_package_check "https://github.com/jihao2048/windows-speech-repair/blob/main/scripts/appx-engine-check.ps1"
click node_damage_check "https://github.com/jihao2048/windows-speech-repair/blob/main/scripts/damage-scope.ps1"
click node_experiments "https://github.com/jihao2048/windows-speech-repair/blob/main/scripts/minimal-test.ps1"
click node_reports "https://github.com/jihao2048/windows-speech-repair/tree/main/%E6%8A%A5%E5%91%8A"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_main,node_guide,node_usage toneBlue
class node_iso,node_extract,node_backup,node_restore,node_register toneAmber
class node_speech_config,node_wu_repair,node_verify toneMint
class node_diagnose,node_package_check,node_damage_check,node_experiments,node_reports toneRose
class node_user,node_windows,node_install_media toneIndigo
```

## Components

### Repair entry

- [One-click repair](https://github.com/jihao2048/windows-speech-repair/blob/main/Fix-Win11VoiceTyping.ps1): `Fix-Win11VoiceTyping.ps1`
- [Repair guide](https://github.com/jihao2048/windows-speech-repair/blob/main/docs/Win11%E8%AF%AD%E9%9F%B3%E9%94%AE%E5%85%A5%E6%95%85%E9%9A%9C%E6%8E%92%E6%9F%A5%E6%8C%87%E5%8D%97.md): `docs/Win11语音键入故障排查指南.md`
- [Script instructions](https://github.com/jihao2048/windows-speech-repair/blob/main/docs/%E4%B8%80%E9%94%AE%E8%84%9A%E6%9C%AC%E4%BD%BF%E7%94%A8%E8%AF%B4%E6%98%8E.md): `docs/一键脚本使用说明.md`

### Package recovery

- [Locate and mount media](https://github.com/jihao2048/windows-speech-repair/blob/main/scripts/iso-check.ps1): `scripts/iso-check.ps1`
- [Extract LKG packages](https://github.com/jihao2048/windows-speech-repair/blob/main/scripts/wim-extract.ps1): `scripts/wim-extract.ps1`
- [Package backups](https://github.com/jihao2048/windows-speech-repair/tree/main/%E5%A4%87%E4%BB%BD): `备份`
- [Restore speech runtime](https://github.com/jihao2048/windows-speech-repair/blob/main/scripts/apply-speechruntime.ps1): `scripts/apply-speechruntime.ps1`
- [Register packages](https://github.com/jihao2048/windows-speech-repair/blob/main/scripts/final-register.ps1): `scripts/final-register.ps1`

### System repair

- [Enable online speech](https://github.com/jihao2048/windows-speech-repair/blob/main/scripts/repair-speech.ps1): `scripts/repair-speech.ps1`
- [Windows Update repair](https://github.com/jihao2048/windows-speech-repair/blob/main/scripts/wu-fix-and-verify.ps1): `scripts/wu-fix-and-verify.ps1`
- [Post-repair verification](https://github.com/jihao2048/windows-speech-repair/blob/main/scripts/post-reboot.ps1): `scripts/post-reboot.ps1`

### Diagnostics and research

- [One-click diagnosis](https://github.com/jihao2048/windows-speech-repair/blob/main/Fix-Win11VoiceTyping.ps1): `Fix-Win11VoiceTyping.ps1`
- [Package checks](https://github.com/jihao2048/windows-speech-repair/blob/main/scripts/appx-engine-check.ps1): `scripts/appx-engine-check.ps1`
- [Damage assessment](https://github.com/jihao2048/windows-speech-repair/blob/main/scripts/damage-scope.ps1): `scripts/damage-scope.ps1`
- [Registration experiments](https://github.com/jihao2048/windows-speech-repair/blob/main/scripts/minimal-test.ps1): `scripts/minimal-test.ps1`
- [Repair reports](https://github.com/jihao2048/windows-speech-repair/tree/main/%E6%8A%A5%E5%91%8A): `报告`

### Other components

- **Administrator**
- **Windows system**
- **Windows install media**

## Connections

- Administrator → Repair guide: consults
- Administrator → One-click repair: runs
- Administrator → Script instructions: consults
- One-click repair → Windows system: diagnoses and repairs
- One-click repair → Windows install media: locates and mounts
- Windows install media → Locate and mount media: provides image
- Locate and mount media → Extract LKG packages: enables extraction
- Extract LKG packages → Package backups: stores packages
- Package backups → Restore speech runtime: supplies package files
- One-click repair → Restore speech runtime: restores missing files
- One-click repair → Enable online speech: enables speech recognition
- One-click repair → Register packages: clears registration state
- One-click repair → Post-repair verification: verifies recovery
- One-click repair → Windows Update repair: repairs update state
- Administrator → One-click diagnosis: runs diagnosis
- One-click diagnosis → Package checks: checks package engine
- One-click diagnosis → Damage assessment: assesses damage
- Administrator → Registration experiments: runs experiments
- One-click diagnosis → Repair reports: records findings
