jxlpzqc / TMSpeech

腾讯会议摸鱼工具
MIT License
515 stars 46 forks source link

把Onlinestream改成OfflineStream出现错误 #10

Open SarahSmitho opened 1 year ago

SarahSmitho commented 1 year ago

image 131 try { _core.Run(); }

156 public void Run() { Run(Encoder, Decoder, Joiner, Tokens, Savefile); }

63 recognizer = new OfflineRecognizer(config);

csukuangfj commented 1 year ago

还有其他的改动没?

offline stream 对应 offline model, 即 non-streaming model online stream 对应 online model, 即 streaming model

两者不能混用。

SarahSmitho commented 1 year ago

用的pruned_transducer_stateless7训练的

SarahSmitho commented 1 year ago

改动就是一些麦克风的代码

SarahSmitho commented 1 year ago
        OfflineRecognizerConfig config = new OfflineRecognizerConfig();
        config.FeatConfig.SampleRate = 16000;
        config.FeatConfig.FeatureDim = 80;
        config.ModelConfig.Transducer.Encoder = encoder;
        config.ModelConfig.Transducer.Decoder = decoder;
        config.ModelConfig.Transducer.Joiner = joiner;
        config.ModelConfig.Tokens = tokens;
        config.DecodingMethod = "greedy_search";
        config.MaxActivePaths = 4;
        config.ModelConfig.Debug = 0;

        recognizer = new OfflineRecognizer(config);`
am009 commented 1 year ago

有点怀疑Offline的模型能不能这样用来流式识别。(我也不太懂)

csukuangfj commented 1 year ago

可以贴和识别有关的完整代码吗