FunASR icon indicating copy to clipboard operation
FunASR copied to clipboard

msvc 2022 编译FunASR c++报错

Open patui opened this issue 7 months ago • 1 comments

编译环境:

  • Windows 10
  • MSVC 2022

文件:ct-transformer-online.cpp

if ((strText.size() > 0 and !(strText[strText.size()-1] & 0x80)) && (strlen(sz_input) > 0 && !(sz_input[0] & 0x80))) strText += " "; 

语法错误:标识符 'and' 前缺少 ')'

使用下面的语法解决:

if ((strText.size() > 0 && !(strText[strText.size() - 1] & 0x80)) &&
    (strlen(sz_input) > 0 && !(sz_input[0] & 0x80))) {
    strText += " ";
}

patui avatar Mar 12 '25 01:03 patui