# simon300000/genshin-voice architecture

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

- Interactive diagram: https://gitdiagram.com/simon300000/genshin-voice
- Repository: https://github.com/simon300000/genshin-voice

## Overview

Genshin Voice is a multilingual voice-line dataset and the tooling that refreshes and distributes it. The main workflow downloads game voice packages, extracts audio, enriches each WAV with game-provided speaker, language, trigger, and transcription metadata, then builds and publishes a Hugging Face dataset. Users can load and filter that dataset; a separate script mirrors it to ModelScope. The README documents these dataset uses and incomplete annotations. Extractor internals were not sampled, so their detailed processing links are omitted.

Main entry points: [`update.ts`](https://github.com/simon300000/genshin-voice/blob/master/update.ts) (Metadata enrichment), [`index.ts`](https://github.com/simon300000/genshin-voice/blob/master/index.ts) (Audio unpack entry), [`parquet.py`](https://github.com/simon300000/genshin-voice/blob/master/parquet.py) (Dataset builder), [`HoyoDown`](https://github.com/simon300000/genshin-voice/tree/master/HoyoDown) (HoyoDown)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_acquisition["Audio acquisition"]
  node_download["Package downloader<br/>[download.ts]"]
  node_hoyodown["HoyoDown"]
  node_assets["Audio assets"]
  node_unpack["Audio unpack entry<br/>[index.ts]"]
  node_extractor["Extractor tools"]
  node_wav["Extracted WAVs"]
end

subgraph group_annotation["Metadata enrichment"]
  node_game_data["Game metadata"]
  node_enrich["Metadata enrichment<br/>[update.ts]"]
  node_voice_json["Voice annotations"]
end

subgraph group_publishing["Dataset publishing"]
  node_metadata["Dataset metadata"]
  node_parquet["Dataset builder<br/>[parquet.py]"]
  node_huggingface[("Hugging Face dataset")]
  node_mirror["ModelScope mirror<br/>[modelscope.py]"]
  node_modelscope[("ModelScope dataset")]
end

subgraph group_consumption["Dataset use"]
  node_example["Load and filter example<br/>[example.py]"]
  node_files["User audio and text"]
end

node_game["Game voice packages"]
node_user(("Dataset user"))

node_download -->|"runs"| node_hoyodown
node_hoyodown -->|"downloads packages"| node_game
node_hoyodown -->|"writes packages"| node_assets
node_unpack -->|"reads packages"| node_assets
node_unpack -->|"calls unpacker"| node_extractor
node_unpack -->|"writes WAVs"| node_wav
node_enrich -->|"reads WAVs"| node_wav
node_enrich -->|"reads metadata"| node_game_data
node_enrich -->|"calls helpers"| node_extractor
node_enrich -->|"writes annotations"| node_voice_json
node_enrich -->|"writes metadata"| node_metadata
node_parquet -->|"reads metadata"| node_metadata
node_parquet -->|"reads audio"| node_wav
node_parquet -->|"publishes dataset"| node_huggingface
node_mirror -->|"downloads snapshot"| node_huggingface
node_mirror -->|"uploads snapshot"| node_modelscope
node_user -->|"runs example"| node_example
node_example -->|"loads dataset"| node_huggingface
node_example -->|"writes audio and text"| node_files

click node_download "https://github.com/simon300000/genshin-voice/blob/master/download.ts"
click node_hoyodown "https://github.com/simon300000/genshin-voice/tree/master/HoyoDown"
click node_assets "https://github.com/simon300000/genshin-voice/tree/master/AudioAssets"
click node_unpack "https://github.com/simon300000/genshin-voice/blob/master/index.ts"
click node_extractor "https://github.com/simon300000/genshin-voice/tree/master/hoyo-voice-extractor"
click node_wav "https://github.com/simon300000/genshin-voice/tree/master/result"
click node_game_data "https://github.com/simon300000/genshin-voice/tree/master/GenshinData"
click node_enrich "https://github.com/simon300000/genshin-voice/blob/master/update.ts"
click node_metadata "https://github.com/simon300000/genshin-voice/tree/master/result"
click node_parquet "https://github.com/simon300000/genshin-voice/blob/master/parquet.py"
click node_mirror "https://github.com/simon300000/genshin-voice/blob/master/modelscope.py"
click node_example "https://github.com/simon300000/genshin-voice/blob/master/example.py"

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_download,node_hoyodown,node_assets,node_unpack,node_extractor,node_wav,node_user toneBlue
class node_game_data,node_enrich,node_voice_json toneAmber
class node_metadata,node_parquet,node_huggingface,node_mirror,node_modelscope toneMint
class node_example,node_files toneRose
class node_game toneIndigo
```

## Components

### Audio acquisition

- [Package downloader](https://github.com/simon300000/genshin-voice/blob/master/download.ts): `download.ts`
- [HoyoDown](https://github.com/simon300000/genshin-voice/tree/master/HoyoDown): `HoyoDown`
- [Audio assets](https://github.com/simon300000/genshin-voice/tree/master/AudioAssets): `AudioAssets`
- [Audio unpack entry](https://github.com/simon300000/genshin-voice/blob/master/index.ts): `index.ts`
- [Extractor tools](https://github.com/simon300000/genshin-voice/tree/master/hoyo-voice-extractor): `hoyo-voice-extractor`
- [Extracted WAVs](https://github.com/simon300000/genshin-voice/tree/master/result): `result`

### Metadata enrichment

- [Game metadata](https://github.com/simon300000/genshin-voice/tree/master/GenshinData): `GenshinData`
- [Metadata enrichment](https://github.com/simon300000/genshin-voice/blob/master/update.ts): `update.ts`
- **Voice annotations**

### Dataset publishing

- [Dataset metadata](https://github.com/simon300000/genshin-voice/tree/master/result): `result`
- [Dataset builder](https://github.com/simon300000/genshin-voice/blob/master/parquet.py): `parquet.py`
- **Hugging Face dataset**
- [ModelScope mirror](https://github.com/simon300000/genshin-voice/blob/master/modelscope.py): `modelscope.py`
- **ModelScope dataset**

### Dataset use

- [Load and filter example](https://github.com/simon300000/genshin-voice/blob/master/example.py): `example.py`
- **User audio and text**

### Other components

- **Game voice packages**
- **Dataset user**

## Connections

- Package downloader → HoyoDown: runs
- HoyoDown → Game voice packages: downloads packages
- HoyoDown → Audio assets: writes packages
- Audio unpack entry → Audio assets: reads packages
- Audio unpack entry → Extractor tools: calls unpacker
- Audio unpack entry → Extracted WAVs: writes WAVs
- Metadata enrichment → Extracted WAVs: reads WAVs
- Metadata enrichment → Game metadata: reads metadata
- Metadata enrichment → Extractor tools: calls helpers
- Metadata enrichment → Voice annotations: writes annotations
- Metadata enrichment → Dataset metadata: writes metadata
- Dataset builder → Dataset metadata: reads metadata
- Dataset builder → Extracted WAVs: reads audio
- Dataset builder → Hugging Face dataset: publishes dataset
- ModelScope mirror → Hugging Face dataset: downloads snapshot
- ModelScope mirror → ModelScope dataset: uploads snapshot
- Dataset user → Load and filter example: runs example
- Load and filter example → Hugging Face dataset: loads dataset
- Load and filter example → User audio and text: writes audio and text
