aboutsummaryrefslogtreecommitdiff
path: root/src/post_proc/trait.rs
blob: 7fced5bfef644913814d992bb7377d3600cf2347 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
/// A text post-processor that transforms transcribed text.
pub trait TextPostProcesser {
    /// Name used in `--post="+name(args)"`.
    fn processer_name() -> &'static str;

    /// Execute the post-processing.
    ///
    /// # Arguments
    /// * `param` — arguments parsed from `--post="+name(arg1, arg2)"`
    /// * `text` — the transcribed text to process
    fn process(param: &[&str], text: &str) -> String;
}