diff options
| author | 魏曹先生 <1992414357@qq.com> | 2026-06-21 22:45:28 +0800 |
|---|---|---|
| committer | 魏曹先生 <1992414357@qq.com> | 2026-06-21 22:45:28 +0800 |
| commit | c6885ae2312a1be589e945129bdd9d268f14c370 (patch) | |
| tree | 919e0fe49331b533de312a39548f17b133ef4975 /src/main.rs | |
| parent | 291c01fd98d44e42bb0a65468e3b6cee3dc25044 (diff) | |
feat: replace `--pinyin` flag with generic `--post="+pinyin"` option
Diffstat (limited to 'src/main.rs')
| -rw-r--r-- | src/main.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/main.rs b/src/main.rs index e3a5b84..73b4e06 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,3 +1,5 @@ +pub mod post_proc; + mod args; pub use args::*; @@ -252,7 +254,7 @@ async fn main() { match rx.recv().await { Ok(event) => match event { vtx_engine::EngineEvent::TranscriptionComplete(result) => { - let raw = maybe_to_pinyin(&result.text, args.use_pinyin); + let raw = run_post_process(&result.text, args.post.as_deref()); let formatted = format_output(&pattern, &raw, 0.0, last_volume_db); for ch in &channels { @@ -260,7 +262,7 @@ async fn main() { } } vtx_engine::EngineEvent::TranscriptionSegment(segment) => { - let raw = maybe_to_pinyin(&segment.text, args.use_pinyin); + let raw = run_post_process(&segment.text, args.post.as_deref()); let formatted = format_output(&pattern, &raw, 0.0, last_volume_db); for ch in &channels { |
