k2-fsa / sherpa

Speech-to-text server framework with next-gen Kaldi
https://k2-fsa.github.io/sherpa
Apache License 2.0
477 stars 97 forks source link

Sherpa-Online inference throws an error when using the temperature #510

Closed lucy9527 closed 7 months ago

lucy9527 commented 7 months ago

sherpa/bin/sherpa-online \ --tokens=$model_dir/tokens.txt \ --nn-model=$model_dir/avg/e29_a2_jit_script_chunk_32_left_256.pt \ --decoding-method=modified_beam_search \ --temperature 1 \ --use-gpu=false \ --padding-seconds=1.2 \

[F] /code/k2/benchmark/sherpa/sherpa/csrc/parse-options.cc:720:float sherpa::ParseOptions::ToFloat(const string&) const 2023-12-04 18:46:21.016 Invalid floating-point option ""
[ Stack-Trace: ]
/anaconda3/envs/sherpa/lib/python3.9/site-packages/sherpa/lib/libsherpa_core.so(sherpa::GetStackTrace()+0x34) [0x7f80bd076a94]
/code/k2/benchmark/sherpa/build/sherpa/bin/sherpa-online(sherpa::Logger::~Logger()+0x3a) [0x40afca]
/anaconda3/envs/sherpa/lib/python3.9/site-packages/sherpa/lib/libsherpa_core.so(sherpa::ParseOptions::ToFloat(std::string const&) const+0x6d) [0x7f80bd0bb9dd]
/anaconda3/envs/sherpa/lib/python3.9/site-packages/sherpa/lib/libsherpa_core.so(sherpa::ParseOptions::SetOption(std::string const&, std::string const&, bool)+0x3cf) [0x7f80bd0bbecf]
/anaconda3/envs/sherpa/lib/python3.9/site-packages/sherpa/lib/libsherpa_core.so(sherpa::ParseOptions::Read(int, char const* const*)+0x274) [0x7f80bd0bca94]
/code/k2/benchmark/sherpa/build/sherpa/bin/sherpa-online() [0x40794a]
/lib64/libc.so.6(__libc_start_main+0xed) [0x7f8065d8102d]
/code/k2/benchmark/sherpa/build/sherpa/bin/sherpa-online() [0x409e1a]

terminate called after throwing an instance of 'std::runtime_error'
  what():  
    Some bad things happened. Please read the above error messages and stack
    trace. If you are using Python, the following command may be helpful:

      gdb --args python /path/to/your/code.py

    (You can use `gdb` to debug the code. Please consider compiling
    a debug version of sherpa.).

    If you are unable to fix it, please open an issue at:

      https://github.com/k2-fsa/sherpa/issues/new

Aborted
csukuangfj commented 7 months ago

please replace

--temperature 1

with

--temperature=1

For c++ commandline options, please use

--key=value

Please don't use

--key value