Code Monkey home page Code Monkey logo

k2-fsa / sherpa-ncnn Goto Github PK

View Code? Open in Web Editor NEW
884.0 884.0 137.0 2.06 MB

Real-time speech recognition using next-gen Kaldi with ncnn without Internet connection. Support iOS, Android, Raspberry Pi, VisionFive2, LicheePi4A etc.

Home Page: https://k2-fsa.github.io/sherpa/ncnn/index.html

License: Apache License 2.0

CMake 10.12% C++ 51.67% Shell 8.57% Kotlin 4.30% Python 5.56% C 2.37% Objective-C 0.13% Swift 6.30% CSS 0.41% HTML 1.11% C# 3.14% Go 2.80% JavaScript 3.51%
cpp python speech-recognition

sherpa-ncnn's People

Contributors

csukuangfj avatar erquren avatar halfteen avatar leohuang2013 avatar littlestone0806 avatar marcoyang1998 avatar nihui avatar pingfengluo avatar pkufool avatar soevai avatar spianmo avatar w11wo avatar winlinvip avatar xiangxyq avatar yujinqiu avatar ziyi6 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sherpa-ncnn's Issues

Android 提示的模型错误

sherpa-ncnn-conv-emformer-transducer-2022-12-04 这个模型在SherpaNcnnKt里面写的仅支持中文,下载下来看却只支持英文

iOS demo 内存太高

在iOS上运行demo的时候,内存高达200多M,请问有什么方法可以优化一下吗

finetune

can I finetune model in other language datasets?

[Help is wanted] Support decoding wav.scp

We have code for decoding a single file
https://github.com/k2-fsa/sherpa-ncnn/blob/master/python-api-examples/decode-file.py

It is nice to support decoding a list of files, e.g., wav.scp.

A wav.scp is a text file and it looks like the following

utt_id_1 /path/to/foo.wav
utt_id_2 /path/to/bar.wav

The decoding results shall be saved into a text file named text, which has the following format:

utt_id_1 recognition result for this file
utt_id_2 recognition result for this file

Please post a comment here if you are interested in this issue. We can provide any help we could.

how to run the stream Chinese demo?

./bin/sherpa-ncnn

Usage:
./bin/sherpa-ncnn
/path/to/tokens.txt
/path/to/encoder.ncnn.param
/path/to/encoder.ncnn.bin
/path/to/decoder.ncnn.param
/path/to/decoder.ncnn.bin
/path/to/joiner.ncnn.param
/path/to/joiner.ncnn.bin
/path/to/foo.wav [num_threads] [decode_method, can be greedy_search/modified_beam_search]

I didn't know where to download param and bin?

also the token.txt? Does this can be packaged in a zip and included in github release page?

执行 build-android-arm64-v8a.sh 编译出错

根据 https://k2-fsa.github.io/sherpa/ncnn/android/build-sherpa-ncnn.html 里面的流程,在执行 build-android-x86-64.sh 这个步骤出现了以下错误:

$ ./build-android-arm64-v8a.sh

  • dir=build-android-arm64-v8a

  • export ANDROID_NDK=D:/Android/Sdk/ndk/22.1.7171670

  • ANDROID_NDK=D:/Android/Sdk/ndk/22.1.7171670

  • mkdir -p build-android-arm64-v8a

  • cd build-android-arm64-v8a

  • '[' -z D:/Android/Sdk/ndk/22.1.7171670 ']'

  • '[' '!' -d D:/Android/Sdk/ndk/22.1.7171670 ']'

  • echo 'ANDROID_NDK: D:/Android/Sdk/ndk/22.1.7171670'
    ANDROID_NDK: D:/Android/Sdk/ndk/22.1.7171670

  • sleep 1

  • cmake -DCMAKE_TOOLCHAIN_FILE=D:/Android/Sdk/ndk/22.1.7171670/build/cmake/android.toolchain.cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON -DSHERPA_NCNN_ENABLE_PORTAUDIO=OFF -DSHERPA_NCNN_ENABLE_BINARY=OFF -DSHERPA_NCNN_ENABLE_TEST=OFF -DSHERPA_NCNN_ENABLE_C_API=OFF -DSHERPA_NCNN_ENABLE_GENERATE_INT8_SCALE_TABLE=OFF -DCMAKE_INSTALL_PREFIX=./install -DANDROID_ABI=arm64-v8a -DANDROID_PLATFORM=android-21 ..
    -- Building for: Visual Studio 17 2022
    CMake Error at CMakeLists.txt:2 (project):
    Failed to run MSBuild command:

    D:/vscode/MSBuild/Current/Bin/amd64/MSBuild.exe

    to get the value of VCTargetsPath:

    MSBuild version 17.4.1+9a89d02ff for .NET Framework
    生成启动时间为 2023/4/19 15:41:58。
    节点 1 上的项目“D:\chromeDownload\sherpa-ncnn-master (1)\sherpa2\sherpa-ncnn\build-android-arm64-v8a\CMakeFiles\3.26.3\VCTargetsPath.vcxproj”(默认目标)。
    D:\vscode\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(832,5): error : The BaseOutputPath/OutputPath property is not set for project 'VCTargetsPath.vcxproj'. Please check to make sure that you have specified a valid combination of Configuration and Platform for this project. Configuration='Debug' Platform='x64'. You may be seeing this message because you are trying to build a project without a solution file, and have specified a non-default Configuration or Platform that doesn't exist for this project. [D:\chromeDownload\sherpa-ncnn-master (1)\sherpa2\sherpa-ncnn\build-android-arm64-v8a\CMakeFiles\3.26.3\VCTargetsPath.vcxproj]
    已完成生成项目“D:\chromeDownload\sherpa-ncnn-master (1)\sherpa2\sherpa-ncnn\build-android-arm64-v8a\CMakeFiles\3.26.3\VCTargetsPath.vcxproj”(默认目标)的操作 - 失败。

    生成失败。

    “D:\chromeDownload\sherpa-ncnn-master (1)\sherpa2\sherpa-ncnn\build-android-arm64-v8a\CMakeFiles\3.26.3\VCTargetsPath.vcxproj”(默认目标) (1) ->
    (_CheckForInvalidConfigurationAndPlatform 目标) ->
    D:\vscode\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(832,5): error : The BaseOutputPath/OutputPath property is not set for project 'VCTargetsPath.vcxproj'. Please check to make sure that you have specified a valid combination of Configuration and Platform for this project. Configuration='Debug' Platform='x64'. You may be seeing this message because you are trying to build a project without a solution file, and have specified a non-default Configuration or Platform that doesn't exist for this project. [D:\chromeDownload\sherpa-ncnn-master (1)\sherpa2\sherpa-ncnn\build-android-arm64-v8a\CMakeFiles\3.26.3\VCTargetsPath.vcxproj]

      0 个警告
      1 个错误
    

    已用时间 00:00:00.10

    Exit code: 1

-- Configuring incomplete, errors occurred!

[Help wanted] sherpa-ncnn for android crash when using LSTM model

如何在安卓平台的sherpa-ncnn Demo中使用LSTM模型?

描述:

当我只是修改对应的ModelConfig时,修改部分代码如下方附录代码,sherpa-ncnn App闪退,看起来是在jniJava_com_k2fsa_sherpa_ncnn_SherpaNcnn_new中调用sherpa_ncnn::Model::Create创建sherpa_ncnn::LstmModel::LstmModel时出现的问题。

推测:

是我在使用LSTM模型时必须要如下示图2中LOGE所述,添加SherpaMetaDataencoder_xxx.ncnn.param中吗?我应该如何添加SherpaMetaData

崩溃日志:

image

image

以下是我修改的SherpaNcnn.kt部分代码:

fun getModelConfig(type: Int, useGPU: Boolean): ModelConfig? {
    when (type) {
        //crash
        1 -> {
            val modelDir = "sherpa-ncnn-streaming-zipformer-bilingual-zh-en-2023-02-13"
            return ModelConfig(
                encoderParam = "$modelDir/encoder_jit_trace-pnnx.ncnn.param",
                encoderBin = "$modelDir/encoder_jit_trace-pnnx.ncnn.bin",
                decoderParam = "$modelDir/decoder_jit_trace-pnnx.ncnn.param",
                decoderBin = "$modelDir/decoder_jit_trace-pnnx.ncnn.bin",
                joinerParam = "$modelDir/joiner_jit_trace-pnnx.ncnn.param",
                joinerBin = "$modelDir/joiner_jit_trace-pnnx.ncnn.bin",
                tokens = "$modelDir/tokens.txt",
                numThreads = 4,
                useGPU = useGPU,
            )
        }
        2 -> {
            val modelDir = "sherpa-ncnn-conv-emformer-transducer-2022-12-08/v2"
            return ModelConfig(
                encoderParam = "$modelDir/encoder_jit_trace-pnnx-epoch-15-avg-3.ncnn.param",
                encoderBin = "$modelDir/encoder_jit_trace-pnnx-epoch-15-avg-3.ncnn.bin",
                decoderParam = "$modelDir/decoder_jit_trace-pnnx-epoch-15-avg-3.ncnn.param",
                decoderBin = "$modelDir/decoder_jit_trace-pnnx-epoch-15-avg-3.ncnn.bin",
                joinerParam = "$modelDir/joiner_jit_trace-pnnx-epoch-15-avg-3.ncnn.param",
                joinerBin = "$modelDir/joiner_jit_trace-pnnx-epoch-15-avg-3.ncnn.bin",
                tokens = "$modelDir/tokens.txt",
                numThreads = 4,
                useGPU = useGPU,
            )
        }
        //crash
        3 -> {
            val modelDir = "sherpa-ncnn-lstm-transducer-small-2023-02-13"
            return ModelConfig(
                encoderParam = "$modelDir/encoder_jit_trace-pnnx.ncnn.param",
                encoderBin = "$modelDir/encoder_jit_trace-pnnx.ncnn.bin",
                decoderParam = "$modelDir/decoder_jit_trace-pnnx.ncnn.param",
                decoderBin = "$modelDir/decoder_jit_trace-pnnx.ncnn.bin",
                joinerParam = "$modelDir/joiner_jit_trace-pnnx.ncnn.param",
                joinerBin = "$modelDir/joiner_jit_trace-pnnx.ncnn.bin",
                tokens = "$modelDir/tokens.txt",
                numThreads = 4,
                useGPU = useGPU,
            )
        }
    }
    return null
}

int8 performance

I just tested the performance of int8 quantization on some Android phone. The phone has 8 CPUs and we use 8 threads for testing.

The following table lists the processing time for decoding a wave, which is 5.1 seconds long.

first run second run third run
cpu, fp16 5.33 seconds 5.44 seconds 5.28 seconds
cpu, int8 4.34 seconds 4.69 seconds 4.55 seconds
Click to see the screenshot of `About phone`
image image
Click to see the output of `cat /proc/cpuinfo`
Processor	: AArch64 Processor rev 4 (aarch64)
processor	: 0
BogoMIPS	: 3.84
Features	: fp asimd evtstrm aes pmull sha1 sha2 crc32
CPU implementer	: 0x41
CPU architecture: 8
CPU variant	: 0x0
CPU part	: 0xd03
CPU revision	: 4

processor	: 1
BogoMIPS	: 3.84
Features	: fp asimd evtstrm aes pmull sha1 sha2 crc32
CPU implementer	: 0x41
CPU architecture: 8
CPU variant	: 0x0
CPU part	: 0xd03
CPU revision	: 4

processor	: 2
BogoMIPS	: 3.84
Features	: fp asimd evtstrm aes pmull sha1 sha2 crc32
CPU implementer	: 0x41
CPU architecture: 8
CPU variant	: 0x0
CPU part	: 0xd03
CPU revision	: 4

processor	: 3
BogoMIPS	: 3.84
Features	: fp asimd evtstrm aes pmull sha1 sha2 crc32
CPU implementer	: 0x41
CPU architecture: 8
CPU variant	: 0x0
CPU part	: 0xd03
CPU revision	: 4

processor	: 4
BogoMIPS	: 3.84
Features	: fp asimd evtstrm aes pmull sha1 sha2 crc32
CPU implementer	: 0x41
CPU architecture: 8
CPU variant	: 0x0
CPU part	: 0xd03
CPU revision	: 4

processor	: 5
BogoMIPS	: 3.84
Features	: fp asimd evtstrm aes pmull sha1 sha2 crc32
CPU implementer	: 0x41
CPU architecture: 8
CPU variant	: 0x0
CPU part	: 0xd03
CPU revision	: 4

processor	: 6
BogoMIPS	: 3.84
Features	: fp asimd evtstrm aes pmull sha1 sha2 crc32
CPU implementer	: 0x41
CPU architecture: 8
CPU variant	: 0x0
CPU part	: 0xd03
CPU revision	: 4

processor	: 7
BogoMIPS	: 3.84
Features	: fp asimd evtstrm aes pmull sha1 sha2 crc32
CPU implementer	: 0x41
CPU architecture: 8
CPU variant	: 0x0
CPU part	: 0xd03
CPU revision	: 4

Failed to load ./sherpa-ncnn-conv-emformer-transducer-small-2023-01-09/encoder_jit_trace-pnnx.ncnn.int8.param

在jetson nano板子上进行实时语音识别时候
sunxt@roybox-desktop:~/kaldi/sherpa-ncnn/build-arm-linux-gnueabihf/install$ ./bin/sherpa-ncnn-alsa \

./sherpa-ncnn-conv-emformer-transducer-small-2023-01-09/tokens.txt
./sherpa-ncnn-conv-emformer-transducer-small-2023-01-09/encoder_jit_trace-pnnx.ncnn.int8.param
./sherpa-ncnn-conv-emformer-transducer-small-2023-01-09/encoder_jit_trace-pnnx.ncnn.int8.bin
./sherpa-ncnn-conv-emformer-transducer-small-2023-01-09/decoder_jit_trace-pnnx.ncnn.param
./sherpa-ncnn-conv-emformer-transducer-small-2023-01-09/decoder_jit_trace-pnnx.ncnn.bin
./sherpa-ncnn-conv-emformer-transducer-small-2023-01-09/joiner_jit_trace-pnnx.ncnn.int8.param
./sherpa-ncnn-conv-emformer-transducer-small-2023-01-09/joiner_jit_trace-pnnx.ncnn.int8.bin
"hw:1,0"
DecoderConfig(method="greedy_search", num_active_paths=4)
fopen ./sherpa-ncnn-conv-emformer-transducer-small-2023-01-09/encoder_jit_trace-pnnx.ncnn.int8.param failed
Failed to load ./sherpa-ncnn-conv-emformer-transducer-small-2023-01-09/encoder_jit_trace-pnnx.ncnn.int8.param
Current sample rate: 16000
Recording started!
Use recording device: hw:1,0
Segmentation fault (core dumped)
缺少文件,但是我下载模型时候已经下载了,这个是需要自己编译的吗

能否做成一个标准库?

在执行了cmake build .命令后,得到了shrpa-ncnn的相关静态库,但是头文件没有,这样就不能在其他项目里直接调用了。
image

一般的C程序,编译后都会提供静态lib文件和include目录,方便快速集成到其他项目里。所以期望build后生成sherpa-ncnnConfing.cmake文件或补充一下install构建后的include目录

Will LM supported?

Hi,

Is the LM decode(e.g. XX_ngram_LG) will be supported in sherpa & sherpa-ncnn later? because i think adding ngram decode can make the asr app more extensive.

Thanks

AssertionError

AssertionError: ./sherpa-ncnn-conv-emformer-transducer-2022-12-06/tokens.txt does not exist 怎么处理

Build fails with libssl missing

shmyrev@kappa ~ $ pip3 install sherpa-ncnn 
Looking in indexes: https://pypi.org/simple, https://pypi.ngc.nvidia.com
Collecting sherpa-ncnn
  Downloading sherpa-ncnn-1.1.tar.gz (41 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 41.8/41.8 kB 31.2 MB/s eta 0:00:00
  Preparing metadata (setup.py) ... done
Requirement already satisfied: numpy in ./local/lib/python3.7/site-packages (from sherpa-ncnn) (1.21.6)
Building wheels for collected packages: sherpa-ncnn
  Building wheel for sherpa-ncnn (setup.py) ... error
  error: subprocess-exited-with-error
  
  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [69 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.linux-x86_64-3.7
      creating build/lib.linux-x86_64-3.7/sherpa_ncnn
      copying sherpa-ncnn/python/sherpa_ncnn/__init__.py -> build/lib.linux-x86_64-3.7/sherpa_ncnn
      copying sherpa-ncnn/python/sherpa_ncnn/recognizer.py -> build/lib.linux-x86_64-3.7/sherpa_ncnn
      running build_ext
      Setting PYTHON_EXECUTABLE to /home/shmyrev/local/bin/python3
      for fast compilation, run:
      export SHERPA_NCNN_MAKE_ARGS="-j"; python setup.py install
      Setting make_args to "-j4"
      build command is:
      
                      cd build/temp.linux-x86_64-3.7
      
                      cmake -DCMAKE_BUILD_TYPE=Release -DPYTHON_EXECUTABLE=/home/shmyrev/local/bin/python3 -DCMAKE_INSTALL_PREFIX=/tmp/pip-install-utf4rf_x/sherpa-ncnn_4b5f7058fd5845ee9d77aba1bca97514/build/lib.linux-x86_64-3.7/sherpa_ncnn  -DBUILD_SHARED_LIBS=ON  -DSHERPA_NCNN_ENABLE_PYTHON=ON  -DSHERPA_NCNN_ENABLE_PORTAUDIO=OFF  /tmp/pip-install-utf4rf_x/sherpa-ncnn_4b5f7058fd5845ee9d77aba1bca97514
      
                      make -j4 install/strip
      
      cmake: error while loading shared libraries: libssl.so.1.0.0: cannot open shared object file: No such file or directory
      make: *** No rule to make target 'install/strip'.  Stop.
      Traceback (most recent call last):
        File "<string>", line 36, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/tmp/pip-install-utf4rf_x/sherpa-ncnn_4b5f7058fd5845ee9d77aba1bca97514/setup.py", line 64, in <module>
          license="Apache licensed, as found in the LICENSE file",
        File "/home/shmyrev/local/lib/python3.7/site-packages/setuptools/__init__.py", line 153, in setup
          return distutils.core.setup(**attrs)
        File "/home/shmyrev/local/lib/python3.7/distutils/core.py", line 148, in setup
          dist.run_commands()
        File "/home/shmyrev/local/lib/python3.7/distutils/dist.py", line 966, in run_commands
          self.run_command(cmd)
        File "/home/shmyrev/local/lib/python3.7/distutils/dist.py", line 985, in run_command
          cmd_obj.run()
        File "/home/shmyrev/local/lib/python3.7/site-packages/wheel/bdist_wheel.py", line 299, in run
          self.run_command('build')
        File "/home/shmyrev/local/lib/python3.7/distutils/cmd.py", line 313, in run_command
          self.distribution.run_command(command)
        File "/home/shmyrev/local/lib/python3.7/distutils/dist.py", line 985, in run_command
          cmd_obj.run()
        File "/home/shmyrev/local/lib/python3.7/distutils/command/build.py", line 135, in run
          self.run_command(cmd_name)
        File "/home/shmyrev/local/lib/python3.7/distutils/cmd.py", line 313, in run_command
          self.distribution.run_command(command)
        File "/home/shmyrev/local/lib/python3.7/distutils/dist.py", line 985, in run_command
          cmd_obj.run()
        File "/home/shmyrev/local/lib/python3.7/site-packages/setuptools/command/build_ext.py", line 79, in run
          _build_ext.run(self)
        File "/home/shmyrev/local/lib/python3.7/site-packages/Cython/Distutils/old_build_ext.py", line 186, in run
          _build_ext.build_ext.run(self)
        File "/home/shmyrev/local/lib/python3.7/distutils/command/build_ext.py", line 340, in run
          self.build_extensions()
        File "/home/shmyrev/local/lib/python3.7/site-packages/Cython/Distutils/old_build_ext.py", line 195, in build_extensions
          _build_ext.build_ext.build_extensions(self)
        File "/home/shmyrev/local/lib/python3.7/distutils/command/build_ext.py", line 449, in build_extensions
          self._build_extensions_serial()
        File "/home/shmyrev/local/lib/python3.7/distutils/command/build_ext.py", line 474, in _build_extensions_serial
          self.build_extension(ext)
        File "/tmp/pip-install-utf4rf_x/sherpa-ncnn_4b5f7058fd5845ee9d77aba1bca97514/cmake/cmake_extension.py", line 119, in build_extension
          "\nBuild sherpa-ncnn failed. Please check the error message.\n"
      Exception:
      Build sherpa-ncnn failed. Please check the error message.
      You can ask for help by creating an issue on GitHub.
      
      Click:
          https://github.com/k2-fsa/sherpa-ncnn/issues/new
      
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for sherpa-ncnn
  Running setup.py clean for sherpa-ncnn
Failed to build sherpa-ncnn
Installing collected packages: sherpa-ncnn
  Running setup.py install for sherpa-ncnn ... error
  error: subprocess-exited-with-error
  
  × Running setup.py install for sherpa-ncnn did not run successfully.
  │ exit code: 1
  ╰─> [73 lines of output]
      running install
      /home/shmyrev/local/lib/python3.7/site-packages/setuptools/command/install.py:37: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
        setuptools.SetuptoolsDeprecationWarning,
      running build
      running build_py
      creating build
      creating build/lib.linux-x86_64-3.7
      creating build/lib.linux-x86_64-3.7/sherpa_ncnn
      copying sherpa-ncnn/python/sherpa_ncnn/__init__.py -> build/lib.linux-x86_64-3.7/sherpa_ncnn
      copying sherpa-ncnn/python/sherpa_ncnn/recognizer.py -> build/lib.linux-x86_64-3.7/sherpa_ncnn
      running build_ext
      Setting PYTHON_EXECUTABLE to /home/shmyrev/local/bin/python3
      for fast compilation, run:
      export SHERPA_NCNN_MAKE_ARGS="-j"; python setup.py install
      Setting make_args to "-j4"
      build command is:
      
                      cd build/temp.linux-x86_64-3.7
      
                      cmake -DCMAKE_BUILD_TYPE=Release -DPYTHON_EXECUTABLE=/home/shmyrev/local/bin/python3 -DCMAKE_INSTALL_PREFIX=/tmp/pip-install-utf4rf_x/sherpa-ncnn_4b5f7058fd5845ee9d77aba1bca97514/build/lib.linux-x86_64-3.7/sherpa_ncnn  -DBUILD_SHARED_LIBS=ON  -DSHERPA_NCNN_ENABLE_PYTHON=ON  -DSHERPA_NCNN_ENABLE_PORTAUDIO=OFF  /tmp/pip-install-utf4rf_x/sherpa-ncnn_4b5f7058fd5845ee9d77aba1bca97514
      
                      make -j4 install/strip
      
      cmake: error while loading shared libraries: libssl.so.1.0.0: cannot open shared object file: No such file or directory
      make: *** No rule to make target 'install/strip'.  Stop.
      Traceback (most recent call last):
        File "<string>", line 36, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/tmp/pip-install-utf4rf_x/sherpa-ncnn_4b5f7058fd5845ee9d77aba1bca97514/setup.py", line 64, in <module>
          license="Apache licensed, as found in the LICENSE file",
        File "/home/shmyrev/local/lib/python3.7/site-packages/setuptools/__init__.py", line 153, in setup
          return distutils.core.setup(**attrs)
        File "/home/shmyrev/local/lib/python3.7/distutils/core.py", line 148, in setup
          dist.run_commands()
        File "/home/shmyrev/local/lib/python3.7/distutils/dist.py", line 966, in run_commands
          self.run_command(cmd)
        File "/home/shmyrev/local/lib/python3.7/distutils/dist.py", line 985, in run_command
          cmd_obj.run()
        File "/home/shmyrev/local/lib/python3.7/site-packages/setuptools/command/install.py", line 68, in run
          return orig.install.run(self)
        File "/home/shmyrev/local/lib/python3.7/distutils/command/install.py", line 545, in run
          self.run_command('build')
        File "/home/shmyrev/local/lib/python3.7/distutils/cmd.py", line 313, in run_command
          self.distribution.run_command(command)
        File "/home/shmyrev/local/lib/python3.7/distutils/dist.py", line 985, in run_command
          cmd_obj.run()
        File "/home/shmyrev/local/lib/python3.7/distutils/command/build.py", line 135, in run
          self.run_command(cmd_name)
        File "/home/shmyrev/local/lib/python3.7/distutils/cmd.py", line 313, in run_command
          self.distribution.run_command(command)
        File "/home/shmyrev/local/lib/python3.7/distutils/dist.py", line 985, in run_command
          cmd_obj.run()
        File "/home/shmyrev/local/lib/python3.7/site-packages/setuptools/command/build_ext.py", line 79, in run
          _build_ext.run(self)
        File "/home/shmyrev/local/lib/python3.7/site-packages/Cython/Distutils/old_build_ext.py", line 186, in run
          _build_ext.build_ext.run(self)
        File "/home/shmyrev/local/lib/python3.7/distutils/command/build_ext.py", line 340, in run
          self.build_extensions()
        File "/home/shmyrev/local/lib/python3.7/site-packages/Cython/Distutils/old_build_ext.py", line 195, in build_extensions
          _build_ext.build_ext.build_extensions(self)
        File "/home/shmyrev/local/lib/python3.7/distutils/command/build_ext.py", line 449, in build_extensions
          self._build_extensions_serial()
        File "/home/shmyrev/local/lib/python3.7/distutils/command/build_ext.py", line 474, in _build_extensions_serial
          self.build_extension(ext)
        File "/tmp/pip-install-utf4rf_x/sherpa-ncnn_4b5f7058fd5845ee9d77aba1bca97514/cmake/cmake_extension.py", line 119, in build_extension
          "\nBuild sherpa-ncnn failed. Please check the error message.\n"
      Exception:
      Build sherpa-ncnn failed. Please check the error message.
      You can ask for help by creating an issue on GitHub.
      
      Click:
          https://github.com/k2-fsa/sherpa-ncnn/issues/new
      
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> sherpa-ncnn

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
WARNING: There was an error checking the latest version of pip.
shmyrev@kappa ~ $ 

sherpa-ncnn build failed on windows plat

I'm on 64bit Windows 10 Ent LTSC. I was acting according to the instructions.
Cmake version 3.26.0-rc3, mingw64 version 8.1.0.
I added compiler environments at the beginning of CMakeLists.txt like:

set( CMAKE_CXX_COMPILER "C:/Tools/mingw64/bin/g++.exe" )
set( CMAKE_C_COMPILER "C:/Tools/mingw64/bin/gcc.exe" )

I continued building the project with:

build> cmake -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release ..

Here is the output:

-- The C compiler identification is GNU 8.1.0
-- The CXX compiler identification is GNU 8.1.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Tools/mingw64/bin/gcc.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Tools/mingw64/bin/g++.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- BUILD_SHARED_LIBS OFF
-- SHERPA_NCNN_ENABLE_PYTHON OFF
-- SHERPA_NCNN_ENABLE_PORTAUDIO ON
-- SHERPA_NCNN_ENABLE_JNI OFF
-- SHERPA_NCNN_ENABLE_BINARY ON
-- SHERPA_NCNN_ENABLE_TEST OFF
-- SHERPA_NCNN_ENABLE_C_API ON
-- SHERPA_NCNN_ENABLE_GENERATE_INT8_SCALE_TABLE ON
-- CMAKE_BUILD_TYPE: Release
-- Looking for C++ include alsa/asoundlib.h
-- Looking for C++ include alsa/asoundlib.h - not found
-- Disabled warnings: /wd4244;/wd4267;/wd4305;/wd4334;/wd4800;/wd4996
-- Downloading kaldi-native-fbank https://github.com/csukuangfj/kaldi-native-fbank/archive/refs/tags/v1.11.tar.gz
-- kaldi-native-fbank is downloaded to C:/Tools/sherpa-ncnn/build/_deps/kaldi_native_fbank-src
-- kaldi-native-fbank's binary dir is C:/Tools/sherpa-ncnn/build/_deps/kaldi_native_fbank-build
-- CMAKE_BUILD_TYPE: Release
-- BUILD_SHARED_LIBS: OFF
-- Set BUILD_SHARED_LIBS to OFF for Windows
-- KALDI_NATIVE_FBANK_BUILD_TESTS: OFF
-- KALDI_NATIVE_FBANK_BUILD_PYTHON: OFF
-- KALDI_NATIVE_FBANK_ENABLE_CHECK: OFF
-- KALDI_NATIVE_FBANK_ENABLE_CHECK: OFF
-- CMAKE_CXX_FLAGS:  /wd4244  /wd4267  /wd4305  /wd4334  /wd4800  /wd4996
-- CMAKE_INSTALL_PREFIX: C:/Program Files (x86)/sherpa-ncnn
-- Looking for C++ include cxxabi.h
-- Looking for C++ include cxxabi.h - not found
-- Looking for C++ include execinfo.h
-- Looking for C++ include execinfo.h - not found
-- Disabled warnings: /wd4244;/wd4267;/wd4624
-- Disable building Python
-- Downloading ncnn https://github.com/csukuangfj/ncnn/archive/refs/tags/sherpa-0.9.tar.gz
-- ncnn is downloaded to C:/Tools/sherpa-ncnn/build/_deps/ncnn-src
-- ncnn's binary dir is C:/Tools/sherpa-ncnn/build/_deps/ncnn-build
-- CMAKE_INSTALL_PREFIX = C:/Program Files (x86)/sherpa-ncnn
-- NCNN_VERSION_STRING = 1.0.20230216
-- Performing Test NCNN_COMPILER_SUPPORT_GNU_INLINE_ASM
-- Performing Test NCNN_COMPILER_SUPPORT_GNU_INLINE_ASM - Failed
CMake Warning at build/_deps/ncnn-src/CMakeLists.txt:152 (message):
  The compiler does not support gnu style inline assembly.
  NCNN_GNU_INLINE_ASM will be OFF.


-- Performing Test NCNN_COMPILER_SUPPORT_X86_AVX
-- Performing Test NCNN_COMPILER_SUPPORT_X86_AVX - Failed
-- Performing Test NCNN_COMPILER_SUPPORT_X86_FMA
-- Performing Test NCNN_COMPILER_SUPPORT_X86_FMA - Failed
-- Performing Test NCNN_COMPILER_SUPPORT_X86_XOP
-- Performing Test NCNN_COMPILER_SUPPORT_X86_XOP - Failed
-- Performing Test NCNN_COMPILER_SUPPORT_X86_F16C
-- Performing Test NCNN_COMPILER_SUPPORT_X86_F16C - Failed
-- Performing Test NCNN_COMPILER_SUPPORT_X86_AVX2
-- Performing Test NCNN_COMPILER_SUPPORT_X86_AVX2 - Failed
-- Performing Test NCNN_COMPILER_SUPPORT_X86_AVX512
-- Performing Test NCNN_COMPILER_SUPPORT_X86_AVX512 - Failed
-- Performing Test NCNN_COMPILER_SUPPORT_X86_AVX_VNNI
-- Performing Test NCNN_COMPILER_SUPPORT_X86_AVX_VNNI - Failed
-- Performing Test NCNN_COMPILER_SUPPORT_X86_AVX512_VNNI
-- Performing Test NCNN_COMPILER_SUPPORT_X86_AVX512_VNNI - Failed
-- Performing Test NCNN_COMPILER_SUPPORT_X86_AVX512_BF16
-- Performing Test NCNN_COMPILER_SUPPORT_X86_AVX512_BF16 - Failed
-- Performing Test NCNN_COMPILER_SUPPORT_X86_AVX512_FP16
-- Performing Test NCNN_COMPILER_SUPPORT_X86_AVX512_FP16 - Failed
CMake Warning at build/_deps/ncnn-src/CMakeLists.txt:476 (message):
  The compiler does not support avx extension.  NCNN_AVX will be OFF.


-- Target arch: x86 64bit
-- Performing Test COMPILER_HAS_DEPRECATED_ATTR
-- Performing Test COMPILER_HAS_DEPRECATED_ATTR - Failed
-- Performing Test COMPILER_HAS_DEPRECATED
-- Performing Test COMPILER_HAS_DEPRECATED - Failed
-- Found OpenMP_C: -fopenmp (found version "4.5")
-- Could NOT find OpenMP_CXX (missing: OpenMP_CXX_FLAGS OpenMP_CXX_LIB_NAMES)
-- Could NOT find OpenMP (missing: OpenMP_CXX_FOUND) (found version "4.5")
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Check if compiler accepts -pthread
-- Check if compiler accepts -pthread - yes
-- Found Threads: TRUE
-- Downloading portaudio from http://files.portaudio.com/archives/pa_stable_v190700_20210406.tgz
-- portaudio is downloaded to C:/Tools/sherpa-ncnn/build/_deps/portaudio-src
-- portaudio's binary dir is C:/Tools/sherpa-ncnn/build/_deps/portaudio-build
CMake Deprecation Warning at build/_deps/portaudio-src/CMakeLists.txt:7 (CMAKE_MINIMUM_REQUIRED):
  Compatibility with CMake < 2.8.12 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.


-- Could NOT find ASIOSDK (missing: ASIOSDK_ROOT_DIR ASIOSDK_INCLUDE_DIR)
-- DirectSound support will be built with DSound provided by MinGW.
-- Configuring done (25.6s)
-- Generating done (0.3s)
-- Build files have been written to: C:/Tools/sherpa-ncnn/build

It seems like every test ended up in failure.
And there is no binary files generated in bin directory.
Any Ideas?

build with vulkan in linux

Hi,
when use build in linux with these command:
image
seems not use vulkan, log is : Don't Use GPU. has_gpu: 0, config.use_vulkan_compute: 0

and when build like this:

cmake -DNCNN_VULKAN=ON ../

`-- Downloading ncnn from https://github.com/csukuangfj/ncnn/archive/refs/tags/sherpa-0.9.tar.gz
-- ncnn is downloaded to /workspace/dopamine-data/chenjiang/gitlab/k2/xyyq_sherpa-ncnn/build/_deps/ncnn-src
-- ncnn's binary dir is /workspace/dopamine-data/chenjiang/gitlab/k2/xyyq_sherpa-ncnn/build/_deps/ncnn-build
-- CMAKE_INSTALL_PREFIX = /usr/local
-- NCNN_VERSION_STRING = 1.0.20230307
CMake Warning at build/_deps/ncnn-src/CMakeLists.txt:442 (message):
The compiler does not support avx vnni extension. NCNN_AVXVNNI will be
OFF.

CMake Warning at build/_deps/ncnn-src/CMakeLists.txt:460 (message):
The compiler does not support avx512 bf16 extension. NCNN_AVX512BF16 will
be OFF.

CMake Warning at build/_deps/ncnn-src/CMakeLists.txt:467 (message):
The compiler does not support avx512 fp16 extension. NCNN_AVX512FP16 will
be OFF.

-- Target arch: x86 64bit
CMake Error at build/_deps/ncnn-src/CMakeLists.txt:544 (message):
The submodules were not downloaded! Please update submodules with "git
submodule update --init" and try again.

-- Configuring incomplete, errors occurred!
`
I just quickly fix this by clone glslang when ncnn needed(this step should automatic, not manual)

but decode result is error:
emformer:
image

lstm :
image

zipformer:
image

run sherpa-ncnn error:layer LSTM2 not exists or registered

在Linux上编译成功,也下载模型参数后,运行:
./sherpa-ncnn
./model/chn/tokens.txt
./model/chn/encoder_jit_trace-epoch-11-avg-2-pnnx.ncnn.param
./model/chn/encoder_jit_trace-epoch-11-avg-2-pnnx.ncnn.bin
./model/chn/decoder_jit_trace-epoch-11-avg-2-pnnx.ncnn.param
./model/chn/decoder_jit_trace-epoch-11-avg-2-pnnx.ncnn.bin
./model/chn/joiner_jit_trace-epoch-11-avg-2-pnnx.ncnn.param
./model/chn/joiner_jit_trace-epoch-11-avg-2-pnnx.ncnn.bin
./model/chn/test_wavs/0.wav

显示错误: layer LSTM2 not exists or registered
程序 core dump了

想问下可能是什么原因,谢谢

layer LSTM2 not exists or registered(A little mistake)

follow this tutorail, when decoding by this command:

./build/bin/sherpa-ncnn \ 
  ./sherpa-ncnn-2022-09-05/tokens.txt \ 
  ./sherpa-ncnn-2022-09-05/bar/encoder_jit_trace-iter-468000-avg-16-pnnx.ncnn.param \ 
  ./sherpa-ncnn-2022-09-05/bar/encoder_jit_trace-iter-468000-avg-16-pnnx.ncnn.bin \ 
  ./sherpa-ncnn-2022-09-05/bar/decoder_jit_trace-iter-468000-avg-16-pnnx.ncnn.param \ 
  ./sherpa-ncnn-2022-09-05/bar/decoder_jit_trace-iter-468000-avg-16-pnnx.ncnn.bin \ 
  ./sherpa-ncnn-2022-09-05/bar/joiner_jit_trace-iter-468000-avg-16-pnnx.ncnn.param \ 
  ./sherpa-ncnn-2022-09-05/bar/joiner_jit_trace-iter-468000-avg-16-pnnx.ncnn.bin \ 
  ./sherpa-ncnn-2022-09-05/test_wavs/1089-134686-0001.wav

got this error:

...
layer LSTM2 not exists or registered
Segmentation fault

then i have replace all LSTM2 to LSTM in ./sherpa-ncnn-2022-09-05/bar/encoder_jit_trace-iter-468000-avg-16-pnnx.ncnn.param, it is working well. It maybe a little mistake.

[Feature Request] Syllable-level Voice Recognition for 1300 mandarin pinyins

I've compiled the sherpa-ncnn android app with the model "sherpa-ncnn-streaming-zipformer-zh-14M-2023-02-23",
the target apk is amazing, only 30MB, it can rather accurately and quickly recognize my chinese words.

My feature request is to use Sherpa-ncnn only as a general syllable recognition engine, and push the speed to the extreme,
so that I can use it as both a hotword detection engine and a long sentence recognition engine.
I can use it as a general hotword detection engine(without fixed pretrained hotwords) to quickly response my users(see the "亭子"(ting2 zhi3), "停止"(ting2 zhi3) in the 2nd attached image),
meanwhile if I need understand the meaning of a long voice of the user,
I can send the output syllable/pinyin sequence to the LLM (eg.ChatGPT-4),
then the ChatGPT-4 can response me the most right chinese characters of the best semantic analysis in the world.

Typically every mandarin syllable cost the same fixed 0.3 seconds, most mandarin syllables contains only "a consonant + a vowel" or "a vowel", so I think that the extreme fast recognition can finish before the user finish pronouncing a mandarin syllable.(see the 1st attached image of phoneme spectrogram)
there're some projects which target is about the syllable/pinyin segmentation, for example:
whisper-timestamped: https://github.com/linto-ai/whisper-timestamped
and a very concise tool aeneas: https://github.com/readbeyond/aeneas

I'm dreaming such a Proactive Syllable Recognition Engine that can achieve the precision of a mechanical keyboard.

My naive idea is that maybe I can modify the training procedure of "sherpa-ncnn-streaming-zipformer-zh-14M-2023-02-23" to build this syllable/pinyin recognition model first (maybe we need to modify the sherpa-ncnn engine itself as well),
There are only 1300 mandarin syllables with tone in total.
any hint?

ref: Possible to use for real-time / streaming tasks openai/whisper#2 (comment)
ref: Transcribe to IPA (International Phonetic Alphabet) openai/whisper#318 (comment)

a

Screenshot 2023-04-09 at 22-57-21 Photo - Google Photos

aarch64运行报错:layer MemoryData not exists or registered Segmentation fault (core dumped)

0 tegra-hda: HDMI 0 (hw:0,3), ALSA (0 in, 2 out)
1 tegra-snd-t210ref-mobile-rt565x: - (hw:1,0), ALSA (16 in, 16 out)
2 tegra-snd-t210ref-mobile-rt565x: - (hw:1,1), ALSA (16 in, 16 out)
3 tegra-snd-t210ref-mobile-rt565x: - (hw:1,2), ALSA (16 in, 16 out)
4 tegra-snd-t210ref-mobile-rt565x: - (hw:1,3), ALSA (16 in, 16 out)
5 tegra-snd-t210ref-mobile-rt565x: - (hw:1,4), ALSA (16 in, 16 out)
6 tegra-snd-t210ref-mobile-rt565x: - (hw:1,5), ALSA (16 in, 16 out)
7 tegra-snd-t210ref-mobile-rt565x: - (hw:1,6), ALSA (16 in, 16 out)
8 tegra-snd-t210ref-mobile-rt565x: - (hw:1,7), ALSA (16 in, 16 out)
9 tegra-snd-t210ref-mobile-rt565x: - (hw:1,8), ALSA (16 in, 16 out)
10 tegra-snd-t210ref-mobile-rt565x: - (hw:1,9), ALSA (16 in, 16 out)
11 hdmi, ALSA (0 in, 2 out)
12 pulse, ALSA (32 in, 32 out)
13 music, ALSA (0 in, 128 out)

  • 14 default, ALSA (32 in, 32 out)
    Use default device: default
    Started! Please speak
    layer MemoryData not exists or registered
    Segmentation fault (core dumped)
    在window上可以正常使用

Update the doc

Recently, two new models are added to sherpa-ncnn:

Also, the following items need to be updated


Note: You can find all models and their usages in
https://github.com/k2-fsa/sherpa-ncnn/blob/master/.github/scripts/run-test.sh

new ncnn code inference result not right

I try to using newest ncnn code to replace _dep folder ncnn code, which is only missing lstm2 layer. Compile OK, but run inference got wrong result. Is your ncnn source code do some special modifications?

Streaming asr api

I noticed that we have c-api for non-streaming. Do we have such api for streaming ? Thanks.

question about beam search in sherpa-ncnn

modified_beam_search in sherpa-ncnn has 3 loops, means the time complexity is O(T*beam*beam), while in icefall, the time complexity is O(T*beam) ?

for (int32_t t = 0; t != encoder_out_.h; ++t) {
std::vector<Hypothesis> prev;
for (int32_t i = 0; i != config_.num_active_paths && cur.Size(); ++i) {
auto cur_best_hyp = cur.GetMostProbable(true);
cur.Remove(cur_best_hyp);
prev.push_back(std::move(cur_best_hyp));
}
cur.clear();
for (const auto &h : prev) {
ncnn::Mat encoder_out_t(encoder_out_.w, encoder_out_.row(t));
BuildDecoderInput(h);
decoder_out_ = model_->RunDecoder(decoder_input_);
ncnn::Mat joiner_out = model_->RunJoiner(encoder_out_t, decoder_out_);
auto joiner_out_ptr = joiner_out.row(0);
log_softmax(joiner_out_ptr, joiner_out.w);
// update active_paths
auto topk =
topk_index(joiner_out_ptr, joiner_out.w, config_.num_active_paths);
for (int i = 0; i != topk.size(); ++i) {

modified_beam_search in icefall or modified_beam_search in icefall

[Help wanted] iOS TODO list

Some TODO lists to improve sherpa-ncnn for iOS:

  • Improve the user interface
    • Add a scroll view to view the history recognition result
    • Increase the size of the Start button
    • Center the hint ASR with Next-gen Kaldi, Press the Start button and possibly colorize the texts
  • Add a Swift UI demo
  • Reduce the number of model files. ncnn supports merging multiple models into a single file

Any help from the community is highly appreciated.

iOS构建失败,在运行./build-ios.sh时报错

log:

`/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/istream:178:22: error: no template named 'basic_ios'
: virtual public basic_ios<_CharT, _Traits>
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/istream:180:5: error: unknown type name 'streamsize'
streamsize _gc;
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/istream:191:67: error: expected ')'
explicit basic_istream(basic_streambuf<char_type, traits_type>* __sb) : _gc(0)
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/istream:191:27: note: to match this '('
explicit basic_istream(basic_streambuf<char_type, traits_type>* __sb) : _gc(0)
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/istream:191:77: error: invalid use of non-static data member '_gc'
explicit basic_istream(basic_streambuf<char_type, traits_type>* __sb) : _gc(0)
^~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/istream:191:5: error: 'explicit' can only appear on non-static member functions
explicit basic_istream(basic_streambuf<char_type, traits_type>* __sb) : _gc(0)
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/istream:190:5: error: 'inline' can only appear on functions
inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/istream:221:31: error: no template named 'basic_ios'
basic_istream& operator>>(basic_ios<char_type, traits_type>&
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/istream:222:39: error: no template named 'basic_ios'
(__pf)(basic_ios<char_type, traits_type>&))
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/istream:226:31: error: unknown type name 'ios_base'
basic_istream& operator>>(ios_base& (
__pf)(ios_base&))
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/istream:226:49: error: unknown type name 'ios_base'
basic_istream& operator>>(ios_base& (__pf)(ios_base&))
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/istream:229:31: error: no template named 'basic_streambuf'; did you mean '::std::basic_istream'?
basic_istream& operator>>(basic_streambuf<char_type, traits_type>
__sb);
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/istream:177:28: note: '::std::basic_istream' declared here
class _LIBCPP_TEMPLATE_VIS basic_istream
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/istream:246:5: error: unknown type name 'streamsize'
streamsize gcount() const {return _gc;}
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/istream:258:40: error: unknown type name 'streamsize'
basic_istream& get(char_type* __s, streamsize __n)
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/istream:261:40: error: unknown type name 'streamsize'
basic_istream& get(char_type* __s, streamsize __n, char_type __dlm);
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/istream:264:24: error: no template named 'basic_streambuf'; did you mean '::std::basic_istream'?
basic_istream& get(basic_streambuf<char_type, traits_type>& __sb)
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/istream:177:28: note: '::std::basic_istream' declared here
class _LIBCPP_TEMPLATE_VIS basic_istream
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/istream:267:24: error: no template named 'basic_streambuf'; did you mean '::std::basic_istream'?
basic_istream& get(basic_streambuf<char_type, traits_type>& __sb, char_type __dlm);
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/istream:177:28: note: '::std::basic_istream' declared here
class _LIBCPP_TEMPLATE_VIS basic_istream
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/istream:270:44: error: unknown type name 'streamsize'
basic_istream& getline(char_type* __s, streamsize __n)
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/istream:273:44: error: unknown type name 'streamsize'
basic_istream& getline(char_type* __s, streamsize __n, char_type __dlm);
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/istream:275:27: error: unknown type name 'streamsize'
basic_istream& ignore(streamsize __n = 1, int_type __dlm = traits_type::eof());
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make[2]: *** [_deps/kaldi_native_fbank-build/kaldi-native-fbank/csrc/CMakeFiles/kaldi-native-fbank-core.dir/feature-window.cc.o] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from /Users/sweet/downloads/sherpa-ncnn-master/build-ios/build/simulator_arm64/_deps/kaldi_native_fbank-src/kaldi-native-fbank/csrc/mel-computations.cc:21:
In file included from /Users/sweet/downloads/sherpa-ncnn-master/build-ios/build/simulator_arm64/_deps/kaldi_native_fbank-src/kaldi-native-fbank/csrc/mel-computations.h:27:
In file included from /Users/sweet/downloads/sherpa-ncnn-master/build-ios/build/simulator_arm64/_deps/kaldi_native_fbank-src/kaldi-native-fbank/csrc/feature-window.h:10:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/sstream:184:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/istream:180:5: error: unknown type name 'streamsize'
streamsize _gc;
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/istream:246:5: error: unknown type name 'streamsize'
streamsize gcount() const {return _gc;}
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/istream:258:40: error: unknown type name 'streamsize'
basic_istream& get(char_type* __s, streamsize __n)
^
In file included from /Users/sweet/downloads/sherpa-ncnn-master/build-ios/build/simulator_arm64/_deps/kaldi_native_fbank-src/kaldi-native-fbank/csrc/feature-fbank.cc:21:
In file included from /Users/sweet/downloads/sherpa-ncnn-master/build-ios/build/simulator_arm64/_deps/kaldi_native_fbank-src/kaldi-native-fbank/csrc/feature-fbank.h:28:
In file included from /Users/sweet/downloads/sherpa-ncnn-master/build-ios/build/simulator_arm64/_deps/kaldi_native_fbank-src/kaldi-native-fbank/csrc/feature-window.h:10:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/sstream:184:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/istream:180:5: error: unknown type name 'streamsize'
streamsize _gc;
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/istream:261:40: error: unknown type name 'streamsize'
basic_istream& get(char_type* __s, streamsize __n, char_type __dlm);
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/istream:246:5: error: unknown type name 'streamsize'
streamsize gcount() const {return _gc;}
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/istream:270:44: error: unknown type name 'streamsize'
basic_istream& getline(char_type* __s, streamsize __n)
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/istream:258:40: error: unknown type name 'streamsize'
basic_istream& get(char_type* __s, streamsize __n)
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/istream:273:44: error: unknown type name 'streamsize'
basic_istream& getline(char_type* __s, streamsize __n, char_type __dlm);
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/istream:261:40: error: unknown type name 'streamsize'
basic_istream& get(char_type* __s, streamsize __n, char_type __dlm);
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/istream:275:27: error: unknown type name 'streamsize'
basic_istream& ignore(streamsize __n = 1, int_type __dlm = traits_type::eof());
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/istream:270:44: error: unknown type name 'streamsize'
basic_istream& getline(char_type* __s, streamsize __n)
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/istream:277:42: error: unknown type name 'streamsize'
basic_istream& read (char_type* __s, streamsize __n);
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/istream:273:44: error: unknown type name 'streamsize'
basic_istream& getline(char_type* __s, streamsize __n, char_type __dlm);
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/istream:278:5: error: unknown type name 'streamsize'
streamsize readsome(char_type* __s, streamsize __n);
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/istream:275:27: error: unknown type name 'streamsize'
basic_istream& ignore(streamsize __n = 1, int_type __dlm = traits_type::eof());
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/istream:278:41: error: unknown type name 'streamsize'
streamsize readsome(char_type* __s, streamsize __n);
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/istream:286:42: error: incomplete type 'std::ios_base' named in nested name specifier
basic_istream& seekg(off_type __off, ios_base::seekdir __dir);
^~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/iosfwd:106:24: note: forward declaration of 'std::ios_base'
class _LIBCPP_TYPE_VIS ios_base;
^
In file included from /Users/sweet/downloads/sherpa-ncnn-master/build-ios/build/simulator_arm64/_deps/kaldi_native_fbank-src/kaldi-native-fbank/csrc/mel-computations.cc:21:
In file included from /Users/sweet/downloads/sherpa-ncnn-master/build-ios/build/simulator_arm64/_deps/kaldi_native_fbank-src/kaldi-native-fbank/csrc/mel-computations.h:27:
In file included from /Users/sweet/downloads/sherpa-ncnn-master/build-ios/build/simulator_arm64/_deps/kaldi_native_fbank-src/kaldi-native-fbank/csrc/feature-window.h:10:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/sstream:184:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/istream:314:44: error: incomplete type 'std::ios_base' named in nested name specifier
if (!__noskipws && (__is.flags() & ios_base::skipws))
^~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/iosfwd:106:24: note: forward declaration of 'std::ios_base'
class _LIBCPP_TYPE_VIS ios_base;
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/istream:277:42: error: unknown type name 'streamsize'
basic_istream& read (char_type* __s, streamsize __n);
^
In file included from /Users/sweet/downloads/sherpa-ncnn-master/build-ios/build/simulator_arm64/_deps/kaldi_native_fbank-src/kaldi-native-fbank/csrc/mel-computations.cc:21:
In file included from /Users/sweet/downloads/sherpa-ncnn-master/build-ios/build/simulator_arm64/_deps/kaldi_native_fbank-src/kaldi-native-fbank/csrc/mel-computations.h:27:
In file included from /Users/sweet/downloads/sherpa-ncnn-master/build-ios/build/simulator_arm64/_deps/kaldi_native_fbank-src/kaldi-native-fbank/csrc/feature-window.h:10:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/sstream:184:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/istream:317:19: error: no template named 'ctype'
const ctype<_CharT>& __ct = use_facet<ctype<_CharT> >(__is.getloc());
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/istream:278:5: error: unknown type name 'streamsize'
streamsize readsome(char_type* __s, streamsize __n);
^
In file included from /Users/sweet/downloads/sherpa-ncnn-master/build-ios/build/simulator_arm64/_deps/kaldi_native_fbank-src/kaldi-native-fbank/csrc/rfft.cc:25:
In file included from /Users/sweet/downloads/sherpa-ncnn-master/build-ios/build/simulator_arm64/_deps/kaldi_native_fbank-src/kaldi-native-fbank/csrc/log.h:27:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/sstream:184:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/istream:180:5: error: unknown type name 'streamsize'
streamsize _gc;
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/istream:317:51: error: use of undeclared identifier 'ctype'; did you mean 'wctype'?
const ctype<_CharT>& __ct = use_facet<ctype<_CharT> >(__is.getloc());
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/cwctype:79:9: note: 'wctype' declared here
using ::wctype _LIBCPP_USING_IF_EXISTS;
^
In file included from /Users/sweet/downloads/sherpa-ncnn-master/build-ios/build/simulator_arm64/_deps/kaldi_native_fbank-src/kaldi-native-fbank/csrc/mel-computations.cc:21:
In file included from /Users/sweet/downloads/sherpa-ncnn-master/build-ios/build/simulator_arm64/_deps/kaldi_native_fbank-src/kaldi-native-fbank/csrc/mel-computations.h:27:
In file included from /Users/sweet/downloads/sherpa-ncnn-master/build-ios/build/simulator_arm64/_deps/kaldi_native_fbank-src/kaldi-native-fbank/csrc/feature-window.h:10:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/sstream:184:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/istream:324:31: error: incomplete type 'std::ios_base' named in nested name specifier
__is.setstate(ios_base::failbit | ios_base::eofbit);
^~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/iosfwd:106:24: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/istreamnote: :278forward declaration of 'std::ios_base':41
: error: unknown type name 'streamsize'class _LIBCPP_TYPE_VIS ios_base;

                   ^
streamsize readsome(char_type* __s, streamsize __n);
                                    ^

In file included from /Users/sweet/downloads/sherpa-ncnn-master/build-ios/build/simulator_arm64/_deps/kaldi_native_fbank-src/kaldi-native-fbank/csrc/mel-computations.cc:21:
In file included from /Users/sweet/downloads/sherpa-ncnn-master/build-ios/build/simulator_arm64/_deps/kaldi_native_fbank-src/kaldi-native-fbank/csrc/mel-computations.h:27:
In file included from /Users/sweet/downloads/sherpa-ncnn-master/build-ios/build/simulator_arm64/_deps/kaldi_native_fbank-src/kaldi-native-fbank/csrc/feature-window.h:10:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/sstream:184:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/istream:324:51: error: incomplete type 'std::ios_base' named in nested name specifier
__is.setstate(ios_base::failbit | ios_base::eofbit);
^~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/iosfwd:106:24: note: forward declaration of 'std::ios_base'
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/istreamclass _LIBCPP_TYPE_VIS ios_base;:
286: ^42
: error: incomplete type 'std::ios_base' named in nested name specifier
basic_istream& seekg(off_type __off, ios_base::seekdir __dir);
^~~~~~~~~~
In file included from /Users/sweet/downloads/sherpa-ncnn-master/build-ios/build/simulator_arm64/_deps/kaldi_native_fbank-src/kaldi-native-fbank/csrc/mel-computations.cc:21:
In file included from /Users/sweet/downloads/sherpa-ncnn-master/build-ios/build/simulator_arm64/_deps/kaldi_native_fbank-src/kaldi-native-fbank/csrc/mel-computations.h:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/iosfwd27::
106In file included from :/Users/sweet/downloads/sherpa-ncnn-master/build-ios/build/simulator_arm64/_deps/kaldi_native_fbank-src/kaldi-native-fbank/csrc/feature-window.h24::10 :
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/sstreamnote: :184forward declaration of 'std::ios_base':

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/istream:329:In file included from 23/Users/sweet/downloads/sherpa-ncnn-master/build-ios/build/simulator_arm64/_deps/kaldi_native_fbank-src/kaldi-native-fbank/csrc/online-feature.cc: class _LIBCPP_TYPE_VIS ios_base;
error: ^
incomplete type 'std::ios_base' named in nested name specifier:
22:
In file included from /Users/sweet/downloads/sherpa-ncnn-master/build-ios/build/simulator_arm64/_deps/kaldi_native_fbank-src/kaldi-native-fbank/csrc/online-feature.h:28:
In file included from /Users/sweet/downloads/sherpa-ncnn-master/build-ios/build/simulator_arm64/_deps/kaldi_native_fbank-src/kaldi-native-fbank/csrc/feature-fbank.h:28:
In file included from __is.setstate(ios_base::failbit);/Users/sweet/downloads/sherpa-ncnn-master/build-ios/build/simulator_arm64/_deps/kaldi_native_fbank-src/kaldi-native-fbank/csrc/feature-window.h
:10 ^~~~~~~~~~:

In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/sstream:184:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/iosfwd:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/istream106::18024::5 : note: error: forward declaration of 'std::ios_base'
unknown type name 'streamsize'
class _LIBCPP_TYPE_VIS ios_base;
^
streamsize _gc;
^
In file included from /Users/sweet/downloads/sherpa-ncnn-master/build-ios/build/simulator_arm64/_deps/kaldi_native_fbank-src/kaldi-native-fbank/csrc/mel-computations.cc:21:
In file included from /Users/sweet/downloads/sherpa-ncnn-master/build-ios/build/simulator_arm64/_deps/kaldi_native_fbank-src/kaldi-native-fbank/csrc/mel-computations.h:27:
In file included from /Users/sweet/downloads/sherpa-ncnn-master/build-ios/build/simulator_arm64/_deps/kaldi_native_fbank-src/kaldi-native-fbank/csrc/feature-window.h:10:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/sstream:184:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/istream:357:5: error: incomplete type 'std::ios_base' named in nested name specifier
ios_base::iostate __state = ios_base::goodbit;
^~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/iosfwd:106:24: note: forward declaration of 'std::ios_base'
class _LIBCPP_TYPE_VIS ios_base;
^
In file included from /Users/sweet/downloads/sherpa-ncnn-master/build-ios/build/simulator_arm64/_deps/kaldi_native_fbank-src/kaldi-native-fbank/csrc/feature-fbank.cc:21:
In file included from /Users/sweet/downloads/sherpa-ncnn-master/build-ios/build/simulator_arm64/_deps/kaldi_native_fbank-src/kaldi-native-fbank/csrc/feature-fbank.h:28:
In file included from /Users/sweet/downloads/sherpa-ncnn-master/build-ios/build/simulator_arm64/_deps/kaldi_native_fbank-src/kaldi-native-fbank/csrc/feature-window.h:10:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/sstream:184:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/istream:314:44: error: incomplete type 'std::ios_base' named in nested name specifier
if (!__noskipws && (__is.flags() & ios_base::skipws))
^~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/iosfwd:106:24: note: forward declaration of 'std::ios_base'
class _LIBCPP_TYPE_VIS ios_base;
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/istream:246:5: error: unknown type name 'streamsize'
streamsize gcount() const {return _gc;}
^
In file included from /Users/sweet/downloads/sherpa-ncnn-master/build-ios/build/simulator_arm64/_deps/kaldi_native_fbank-src/kaldi-native-fbank/csrc/mel-computations.cc:21:
In file included from /Users/sweet/downloads/sherpa-ncnn-master/build-ios/build/simulator_arm64/_deps/kaldi_native_fbank-src/kaldi-native-fbank/csrc/mel-computations.h:27:
In file included from /Users/sweet/downloads/sherpa-ncnn-master/build-ios/build/simulator_arm64/_deps/kaldi_native_fbank-src/kaldi-native-fbank/csrc/feature-window.h:10:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/sstream:184:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/istream:357:23: error: use of undeclared identifier '__state'; did you mean '__rotate'?
ios_base::iostate __state = ios_base::goodbit;
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/__algorithm/rotate.h:141:1: note: '__rotate' declared here
__rotate(_ForwardIterator __first, _ForwardIterator __middle, _ForwardIterator __last,
^
In file included from /Users/sweet/downloads/sherpa-ncnn-master/build-ios/build/simulator_arm64/_deps/kaldi_native_fbank-src/kaldi-native-fbank/csrc/feature-fbank.cc:21:
In file included from /Users/sweet/downloads/sherpa-ncnn-master/build-ios/build/simulator_arm64/_deps/kaldi_native_fbank-src/kaldi-native-fbank/csrc/feature-fbank.h:28:
In file included from /Users/sweet/downloads/sherpa-ncnn-master/build-ios/build/simulator_arm64/_deps/kaldi_native_fbank-src/kaldi-native-fbank/csrc/feature-window.h:10:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/sstream:184:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/istream:317:19: error: no template named 'ctype'
const ctype<_CharT>& __ct = use_facet<ctype<_CharT> >(__is.getloc());
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/istream:246:5: error: unknown type name 'streamsize'
streamsize gcount() const {return _gc;}
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/istream:258:40: error: unknown type name 'streamsize'
basic_istream& get(char_type* __s, streamsize __n)
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/istream:317:51: error: use of undeclared identifier 'ctype'; did you mean 'wctype'?
const ctype<_CharT>& __ct = use_facet<ctype<_CharT> >(__is.getloc());
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/cwctype:79:9: note: 'wctype' declared here
using ::wctype _LIBCPP_USING_IF_EXISTS;
^
In file included from /Users/sweet/downloads/sherpa-ncnn-master/build-ios/build/simulator_arm64/_deps/kaldi_native_fbank-src/kaldi-native-fbank/csrc/feature-fbank.cc:21:
In file included from /Users/sweet/downloads/sherpa-ncnn-master/build-ios/build/simulator_arm64/_deps/kaldi_native_fbank-src/kaldi-native-fbank/csrc/feature-fbank.h:28:
In file included from /Users/sweet/downloads/sherpa-ncnn-master/build-ios/build/simulator_arm64/_deps/kaldi_native_fbank-src/kaldi-native-fbank/csrc/feature-window.h:10:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/sstream:184:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/istream:324:31: error: incomplete type 'std::ios_base' named in nested name specifier
__is.setstate(ios_base::failbit | ios_base::eofbit);
^~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/iosfwd:106:24: note: forward declaration of 'std::ios_base'
class _LIBCPP_TYPE_VIS ios_base;
^
In file included from /Users/sweet/downloads/sherpa-ncnn-master/build-ios/build/simulator_arm64/_deps/kaldi_native_fbank-src/kaldi-native-fbank/csrc/feature-fbank.cc:21:
In file included from /Users/sweet/downloads/sherpa-ncnn-master/build-ios/build/simulator_arm64/_deps/kaldi_native_fbank-src/kaldi-native-fbank/csrc/feature-fbank.h:28:
In file included from /Users/sweet/downloads/sherpa-ncnn-master/build-ios/build/simulator_arm64/_deps/kaldi_native_fbank-src/kaldi-native-fbank/csrc/feature-window.h:10:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/sstream:184:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/istream:324:51: error: incomplete type 'std::ios_base' named in nested name specifier
__is.setstate(ios_base::failbit | ios_base::eofbit);
^~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/iosfwd:106:24: note: forward declaration of 'std::ios_base'
class _LIBCPP_TYPE_VIS ios_base;
^
In file included from /Users/sweet/downloads/sherpa-ncnn-master/build-ios/build/simulator_arm64/_deps/kaldi_native_fbank-src/kaldi-native-fbank/csrc/feature-fbank.cc:21:
In file included from /Users/sweet/downloads/sherpa-ncnn-master/build-ios/build/simulator_arm64/_deps/kaldi_native_fbank-src/kaldi-native-fbank/csrc/feature-fbank.h:28:
In file included from /Users/sweet/downloads/sherpa-ncnn-master/build-ios/build/simulator_arm64/_deps/kaldi_native_fbank-src/kaldi-native-fbank/csrc/feature-window.h:10:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/sstream:184:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/istream:329:23: error: incomplete type 'std::ios_base' named in nested name specifier
__is.setstate(ios_base::failbit);
^~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/iosfwd:106:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/istream:258:40: error: unknown type name 'streamsize'
basic_istream& get(char_type* __s, streamsize __n)
^
24: note: forward declaration of 'std::ios_base'
class _LIBCPP_TYPE_VIS ios_base;
^
In file included from /Users/sweet/downloads/sherpa-ncnn-master/build-ios/build/simulator_arm64/_deps/kaldi_native_fbank-src/kaldi-native-fbank/csrc/feature-fbank.cc:21:
In file included from /Users/sweet/downloads/sherpa-ncnn-master/build-ios/build/simulator_arm64/_deps/kaldi_native_fbank-src/kaldi-native-fbank/csrc/feature-fbank.h:28:
In file included from /Users/sweet/downloads/sherpa-ncnn-master/build-ios/build/simulator_arm64/_deps/kaldi_native_fbank-src/kaldi-native-fbank/csrc/feature-window.h:10:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/sstream:184:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/istream:357:5: error: incomplete type 'std::ios_base' named in nested name specifier
ios_base::iostate __state = ios_base::goodbit;
^~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/istream:261:40: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/iosfwd:106error: :24:unknown type name 'streamsize'
note: forward declaration of 'std::ios_base'
class _LIBCPP_TYPE_VIS ios_base;
^
basic_istream& get(char_type* __s, streamsize __n, char_type __dlm);
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/istream:261:40: error: unknown type name 'streamsize'
basic_istream& get(char_type* __s, streamsize __n, char_type __dlm);
^
In file included from /Users/sweet/downloads/sherpa-ncnn-master/build-ios/build/simulator_arm64/_deps/kaldi_native_fbank-src/kaldi-native-fbank/csrc/feature-fbank.cc:21:
In file included from /Users/sweet/downloads/sherpa-ncnn-master/build-ios/build/simulator_arm64/_deps/kaldi_native_fbank-src/kaldi-native-fbank/csrc/feature-fbank.h:28:
In file included from /Users/sweet/downloads/sherpa-ncnn-master/build-ios/build/simulator_arm64/_deps/kaldi_native_fbank-src/kaldi-native-fbank/csrc/feature-window.h:10:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/sstream:184:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/istream:357:23: error: use of undeclared identifier '__state'; did you mean '__rotate'?
ios_base::iostate __state = ios_base::goodbit;
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/__algorithm/rotate.h:141:1: note: '__rotate' declared here
__rotate(_ForwardIterator __first, _ForwardIterator __middle, _ForwardIterator __last,
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/istream:270:44: error: unknown type name 'streamsize'
basic_istream& getline(char_type* __s, streamsize __n)
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/istream:270:44: error: unknown type name 'streamsize'
basic_istream& getline(char_type* __s, streamsize __n)
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/istream:273:44: error: unknown type name 'streamsize'
basic_istream& getline(char_type* __s, streamsize __n, char_type __dlm);
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/istream:273:44: error: unknown type name 'streamsize'
basic_istream& getline(char_type* __s, streamsize __n, char_type __dlm);
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/istream:275:27: error: unknown type name 'streamsize'
basic_istream& ignore(streamsize __n = 1, int_type __dlm = traits_type::eof());
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/istream:275:27: error: unknown type name 'streamsize'
basic_istream& ignore(streamsize __n = 1, int_type __dlm = traits_type::eof());
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/istream:277:42: error: unknown type name 'streamsize'
basic_istream& read (char_type* __s, streamsize __n);
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/istream:277:42: error: unknown type name 'streamsize'
basic_istream& read (char_type* __s, streamsize __n);
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/istream:278:5: error: unknown type name 'streamsize'
streamsize readsome(char_type* __s, streamsize __n);
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/istream:278:5: error: unknown type name 'streamsize'
streamsize readsome(char_type* __s, streamsize __n);
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/istream:278:41: error: unknown type name 'streamsize'
streamsize readsome(char_type* __s, streamsize __n);
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/istream:286:42: error: incomplete type 'std::ios_base' named in nested name specifier
basic_istream& seekg(off_type __off, ios_base::seekdir __dir);
^~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/iosfwd:106:24: note: forward declaration of 'std::ios_base'
class _LIBCPP_TYPE_VIS ios_base;
^
In file included from /Users/sweet/downloads/sherpa-ncnn-master/build-ios/build/simulator_arm64/_deps/kaldi_native_fbank-src/kaldi-native-fbank/csrc/online-feature.cc:22:
In file included from /Users/sweet/downloads/sherpa-ncnn-master/build-ios/build/simulator_arm64/_deps/kaldi_native_fbank-src/kaldi-native-fbank/csrc/online-feature.h:28:
In file included from /Users/sweet/downloads/sherpa-ncnn-master/build-ios/build/simulator_arm64/_deps/kaldi_native_fbank-src/kaldi-native-fbank/csrc/feature-fbank.h:28:
In file included from /Users/sweet/downloads/sherpa-ncnn-master/build-ios/build/simulator_arm64/_deps/kaldi_native_fbank-src/kaldi-native-fbank/csrc/feature-window.h:10:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/sstream:184:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/istream:314:44: error: incomplete type 'std::ios_base' named in nested name specifier
if (!__noskipws && (__is.flags() & ios_base::skipws))
^~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/iosfwd:106:24: note: forward declaration of 'std::ios_base'
class _LIBCPP_TYPE_VIS ios_base;
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/istream:278:41: error: unknown type name 'streamsize'
streamsize readsome(char_type* __s, streamsize __n);
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/istream:286:42: error: incomplete type 'std::ios_base' named in nested name specifier
basic_istream& seekg(off_type __off, ios_base::seekdir __dir);
^~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/iosfwd:106:24: note: forward declaration of 'std::ios_base'
class _LIBCPP_TYPE_VIS ios_base;
^
In file included from /Users/sweet/downloads/sherpa-ncnn-master/build-ios/build/simulator_arm64/_deps/kaldi_native_fbank-src/kaldi-native-fbank/csrc/online-feature.cc:22:
In file included from /Users/sweet/downloads/sherpa-ncnn-master/build-ios/build/simulator_arm64/_deps/kaldi_native_fbank-src/kaldi-native-fbank/csrc/online-feature.h:28:
In file included from /Users/sweet/downloads/sherpa-ncnn-master/build-ios/build/simulator_arm64/_deps/kaldi_native_fbank-src/kaldi-native-fbank/csrc/feature-fbank.h:28:
In file included from /Users/sweet/downloads/sherpa-ncnn-master/build-ios/build/simulator_arm64/_deps/kaldi_native_fbank-src/kaldi-native-fbank/csrc/feature-window.h:10:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/sstream:184:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/istream:317:19: error: no template named 'ctype'
const ctype<_CharT>& __ct = use_facet<ctype<_CharT> >(__is.getloc());
^
In file included from /Users/sweet/downloads/sherpa-ncnn-master/build-ios/build/simulator_arm64/_deps/kaldi_native_fbank-src/kaldi-native-fbank/csrc/rfft.cc:25:
In file included from /Users/sweet/downloads/sherpa-ncnn-master/build-ios/build/simulator_arm64/_deps/kaldi_native_fbank-src/kaldi-native-fbank/csrc/log.h:27:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/sstream:184:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/istream:314:44: error: incomplete type 'std::ios_base' named in nested name specifier
if (!__noskipws && (__is.flags() & ios_base::skipws))
^~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/iosfwd:106:24: note: forward declaration of 'std::ios_base'
class _LIBCPP_TYPE_VIS ios_base;
^
20 errors generated.
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/istream:317:51: error: use of undeclared identifier 'ctype'; did you mean 'wctype'?
const ctype<_CharT>& __ct = use_facet<ctype<_CharT> >(__is.getloc());
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/cwctype:79:9: note: 'wctype' declared here
using ::wctype _LIBCPP_USING_IF_EXISTS;
^
In file included from /Users/sweet/downloads/sherpa-ncnn-master/build-ios/build/simulator_arm64/_deps/kaldi_native_fbank-src/kaldi-native-fbank/csrc/online-feature.cc:22:
In file included from /Users/sweet/downloads/sherpa-ncnn-master/build-ios/build/simulator_arm64/_deps/kaldi_native_fbank-src/kaldi-native-fbank/csrc/online-feature.h:28:
In file included from /Users/sweet/downloads/sherpa-ncnn-master/build-ios/build/simulator_arm64/_deps/kaldi_native_fbank-src/kaldi-native-fbank/csrc/feature-fbank.h:28:
In file included from /Users/sweet/downloads/sherpa-ncnn-master/build-ios/build/simulator_arm64/_deps/kaldi_native_fbank-src/kaldi-native-fbank/csrc/feature-window.h:10:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/sstream:184:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/istream:324:31: error: incomplete type 'std::ios_base' named in nested name specifier
__is.setstate(ios_base::failbit | ios_base::eofbit);
^~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/iosfwd:106:24: note: forward declaration of 'std::ios_base'
class _LIBCPP_TYPE_VIS ios_base;In file included from
/Users/sweet/downloads/sherpa-ncnn-master/build-ios/build/simulator_arm64/_deps/kaldi_native_fbank-src/kaldi-native-fbank/csrc/rfft.cc: ^25
:
In file included from /Users/sweet/downloads/sherpa-ncnn-master/build-ios/build/simulator_arm64/_deps/kaldi_native_fbank-src/kaldi-native-fbank/csrc/log.h:27:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/sstream:184:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/istream:317In file included from :19/Users/sweet/downloads/sherpa-ncnn-master/build-ios/build/simulator_arm64/_deps/kaldi_native_fbank-src/kaldi-native-fbank/csrc/online-feature.cc:: 22:
error: In file included from /Users/sweet/downloads/sherpa-ncnn-master/build-ios/build/simulator_arm64/_deps/kaldi_native_fbank-src/kaldi-native-fbank/csrc/online-feature.hno template named 'ctype':28
:
In file included from /Users/sweet/downloads/sherpa-ncnn-master/build-ios/build/simulator_arm64/_deps/kaldi_native_fbank-src/kaldi-native-fbank/csrc/feature-fbank.h:28:
In file included from /Users/sweet/downloads/sherpa-ncnn-master/build-ios/build/simulator_arm64/_deps/kaldi_native_fbank-src/kaldi-native-fbank/csrc/feature-window.h:10:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/sstream:184:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/istream:324:51: error: incomplete type 'std::ios_base' named in nested name specifier const ctype<_CharT>& __ct = use_facet<ctype<_CharT> >(__is.getloc());

              ^
            __is.setstate(ios_base::failbit | ios_base::eofbit);
                                              ^~~~~~~~~~

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/iosfwd:106:24: note: forward declaration of 'std::ios_base'
class _LIBCPP_TYPE_VIS ios_base;
^
In file included from /Users/sweet/downloads/sherpa-ncnn-master/build-ios/build/simulator_arm64/_deps/kaldi_native_fbank-src/kaldi-native-fbank/csrc/online-feature.cc:22:
In file included from /Users/sweet/downloads/sherpa-ncnn-master/build-ios/build/simulator_arm64/_deps/kaldi_native_fbank-src/kaldi-native-fbank/csrc/online-feature.h:28:
In file included from /Users/sweet/downloads/sherpa-ncnn-master/build-ios/build/simulator_arm64/_deps/kaldi_native_fbank-src/kaldi-native-fbank/csrc/feature-fbank.h:28:
In file included from /Users/sweet/downloads/sherpa-ncnn-master/build-ios/build/simulator_arm64/_deps/kaldi_native_fbank-src/kaldi-native-fbank/csrc/feature-window.h:10:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/sstream:184:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/istream:329:23: error: incomplete type 'std::ios_base' named in nested name specifier
__is.setstate(ios_base::failbit);
^~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/iosfwd:106:24: note: forward declaration of 'std::ios_base'
class _LIBCPP_TYPE_VIS ios_base;
^
In file included from /Users/sweet/downloads/sherpa-ncnn-master/build-ios/build/simulator_arm64/_deps/kaldi_native_fbank-src/kaldi-native-fbank/csrc/online-feature.cc:22:
In file included from /Users/sweet/downloads/sherpa-ncnn-master/build-ios/build/simulator_arm64/_deps/kaldi_native_fbank-src/kaldi-native-fbank/csrc/online-feature.h:28:
In file included from /Users/sweet/downloads/sherpa-ncnn-master/build-ios/build/simulator_arm64/_deps/kaldi_native_fbank-src/kaldi-native-fbank/csrc/feature-fbank.h:28:
In file included from /Users/sweet/downloads/sherpa-ncnn-master/build-ios/build/simulator_arm64/_deps/kaldi_native_fbank-src/kaldi-native-fbank/csrc/feature-window.h:10:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/sstream:184:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/istream:357:5: error: incomplete type 'std::ios_base' named in nested name specifier
ios_base::iostate __state = ios_base::goodbit;
^~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/iosfwd:106:24: note: forward declaration of 'std::ios_base'
class _LIBCPP_TYPE_VIS ios_base;
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/istream:317:51: error: use of undeclared identifier 'ctype'; did you mean 'wctype'?
const ctype<_CharT>& __ct = use_facet<ctype<_CharT> >(__is.getloc());
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/cwctype:79:9: note: 'wctype' declared here
using ::wctype _LIBCPP_USING_IF_EXISTS;
^
In file included from /Users/sweet/downloads/sherpa-ncnn-master/build-ios/build/simulator_arm64/_deps/kaldi_native_fbank-src/kaldi-native-fbank/csrc/rfft.cc:25:
In file included from /Users/sweet/downloads/sherpa-ncnn-master/build-ios/build/simulator_arm64/_deps/kaldi_native_fbank-src/kaldi-native-fbank/csrc/log.h:27:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/sstream:184:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/istream:324:31: error: incomplete type 'std::ios_base' named in nested name specifier
__is.setstate(ios_base::failbit | ios_base::eofbit);
^~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/iosfwd:106:24: note: forward declaration of 'std::ios_base'
class _LIBCPP_TYPE_VIS ios_base;
^
In file included from /Users/sweet/downloads/sherpa-ncnn-master/build-ios/build/simulator_arm64/_deps/kaldi_native_fbank-src/kaldi-native-fbank/csrc/online-feature.cc:22:
In file included from In file included from /Users/sweet/downloads/sherpa-ncnn-master/build-ios/build/simulator_arm64/_deps/kaldi_native_fbank-src/kaldi-native-fbank/csrc/rfft.cc/Users/sweet/downloads/sherpa-ncnn-master/build-ios/build/simulator_arm64/_deps/kaldi_native_fbank-src/kaldi-native-fbank/csrc/online-feature.h::2528:
:
In file included from In file included from /Users/sweet/downloads/sherpa-ncnn-master/build-ios/build/simulator_arm64/_deps/kaldi_native_fbank-src/kaldi-native-fbank/csrc/log.h/Users/sweet/downloads/sherpa-ncnn-master/build-ios/build/simulator_arm64/_deps/kaldi_native_fbank-src/kaldi-native-fbank/csrc/feature-fbank.h::2728:
:
In file included from In file included f/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/sstream:184:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/istream:324:51: error: incomplete type 'std::ios_base' named in nested name specifier
__is.setstate(ios_base::failbit | ios_base::eofbit);
^~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/iosfwd:106:24: note: forward declaration of 'std::ios_base'
class _LIBCPP_TYPE_VIS ios_base;
^
In file included from /Users/sweet/downloads/sherpa-ncnn-master/build-ios/build/simulator_arm64/_deps/kaldi_native_fbank-src/kaldi-native-fbank/csrc/rfft.cc:25:
In file included from /Users/sweet/downloads/sherpa-ncnn-master/build-ios/build/simulator_arm64/_deps/kaldi_native_fbank-src/kaldi-native-fbank/csrc/log.h:27:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/sstream:184:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/istream:329:23: error: incomplete type 'std::ios_base' named in nested name specifier
__is.setstate(ios_base::failbit);
^~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/iosfwd:106:24: note: forward declaration of 'std::ios_base'
class _LIBCPP_TYPE_VIS ios_base;
^
rom /Users/sweet/downloads/sherpa-ncnn-master/build-ios/build/simulator_arm64/_deps/kaldi_native_fbank-src/kaldi-native-fbank/csrc/feature-window.h:10:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/sstream:184:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/istream:357:23: error: use of undeclared identifier '__state'; did you mean '__rotate'?
ios_base::iostate __state = ios_base::goodbit;
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/__algorithm/rotate.h:141:1: note: '__rotate' declared here
__rotate(_ForwardIterator __first, _ForwardIterator __middle, _ForwardIterator __last,
^
In file included from /Users/sweet/downloads/sherpa-ncnn-master/build-ios/build/simulator_arm64/_deps/kaldi_native_fbank-src/kaldi-native-fbank/csrc/rfft.cc:25:
In file included from /Users/sweet/downloads/sherpa-ncnn-master/build-ios/build/simulator_arm64/_deps/kaldi_native_fbank-src/kaldi-native-fbank/csrc/log.h:27:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/sstream:184:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/istream:357:5: error: incomplete type 'std::ios_base' named in nested name specifier
ios_base::iostate __state = ios_base::goodbit;
^~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/iosfwd:106:24: note: forward declaration of 'std::ios_base'
class _LIBCPP_TYPE_VIS ios_base;
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
In file included from /Users/sweet/downloads/sherpa-ncnn-master/build-ios/build/simulator_arm64/_deps/kaldi_native_fbank-src/kaldi-native-fbank/csrc/rfft.cc:25:
In file included from /Users/sweet/downloads/sherpa-ncnn-master/build-ios/build/simulator_arm64/_deps/kaldi_native_fbank-src/kaldi-native-fbank/csrc/log.h:27:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/sstream:184:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/istream:357:23: error: use of undeclared identifier '__state'; did you mean '__rotate'?
ios_base::iostate __state = ios_base::goodbit;
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/c++/v1/__algorithm/rotate.h:141:1: note: '__rotate' declared here
__rotate(_ForwardIterator __first, _ForwardIterator __middle, _ForwardIterator __last,
^
make[2]: *** [_deps/kaldi_native_fbank-build/kaldi-native-fbank/csrc/CMakeFiles/kaldi-native-fbank-core.dir/mel-computations.cc.o] Error 1
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
20 errors generated.
make[2]: *** [_deps/kaldi_native_fbank-build/kaldi-native-fbank/csrc/CMakeFiles/kaldi-native-fbank-core.dir/rfft.cc.o] Error 1
make[2]: *** [_deps/kaldi_native_fbank-build/kaldi-native-fbank/csrc/CMakeFiles/kaldi-native-fbank-core.dir/feature-fbank.cc.o] Error 1
20 errors generated.
make[2]: *** [_deps/kaldi_native_fbank-build/kaldi-native-fbank/csrc/CMakeFiles/kaldi-native-fbank-core.dir/online-feature.cc.o] Error 1`

我的运行环境:
Mac:
Intel Core i7

MacOS:
Ventura 13.2.1

Xcode:
14.2(14C18)

CMake:
3.26.3

gcc:
Apple clang version 14.0.0 (clang-1400.0.29.202)

weird recognized result from windows

I have successfully built sherpa-ncnn on windows 32 bit system. However, i found the result looked weird. I think the encoding format may have something to modify. The model i used is the one named sherpa-ncnn-streaming-zipformer-zh-14M-2023-02-23.

The results is below
瀵规垜鍋氫簡浠嬬粛閭d箞鎴戞兂璇寸殑鏄ぇ瀹跺鏋滃鎴戠殑鐮旂┒鎰熷叴瓒?

语音交互咨询

我尝试了用k2进行语音识别,但是语音交互这方面不是很懂,如果我在jetson nano板子上(arm)进行语音交互(asr,nlp,tts),我怎么把识别出来的文字传给nlp呢,我咨询了chatgpt,以及谷歌搜索,都没有很好的建议,大佬可以给出一些指点或者学习方向吗

sherpa-ncnn-microphone crash in debug mode.

OS: macOS intel x86 2.6 GHz 6-Core Intel Core i7
Commit: master 0de3fb1 [origin/master] Support building dll on Windows (#143)

The default make is release, it works well. It crash when I switch to debug mode:

cd ~/git
git clone https://github.com/k2-fsa/sherpa-ncnn
cd sherpa-ncnn
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Debug ..
make -j6

Stuck and crash when run:

./bin/sherpa-ncnn-microphone \
  ./models/tokens.txt ./models/encoder_jit_trace-pnnx.ncnn.param \
  ./models/encoder_jit_trace-pnnx.ncnn.bin ./models/decoder_jit_trace-pnnx.ncnn.param \
  ./models/decoder_jit_trace-pnnx.ncnn.bin ./models/joiner_jit_trace-pnnx.ncnn.param \
  ./models/joiner_jit_trace-pnnx.ncnn.bin

Note: Also crash when build and debug in CLion IDE.

I use this model

cd ~/git
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/csukuangfj/sherpa-ncnn-streaming-zipformer-bilingual-zh-en-2023-02-13
cd sherpa-ncnn-streaming-zipformer-bilingual-zh-en-2023-02-13
git lfs pull --include "*.bin"

cd ~/git/sherpa-ncnn/build
ln -sf ../../sherpa-ncnn-streaming-zipformer-bilingual-zh-en-2023-02-13 models

The crash information:

libc++abi: terminating with uncaught exception of type std::out_of_range: deque
Abort trap: 6

Start by lldb:

MB0:build video$ lldb -- ./bin/sherpa-ncnn-microphone   ./models/tokens.txt ./models/encoder_jit_trace-pnnx.ncnn.param   ./models/encoder_jit_trace-pnnx.ncnn.bin ./models/decoder_jit_trace-pnnx.ncnn.param   ./models/decoder_jit_trace-pnnx.ncnn.bin ./models/joiner_jit_trace-pnnx.ncnn.param   ./models/joiner_jit_trace-pnnx.ncnn.bin
(lldb) target create "./bin/sherpa-ncnn-microphone"
Current executable set to '/Users/video/git/sherpa-ncnn/build/bin/sherpa-ncnn-microphone' (x86_64).
(lldb) settings set -- target.run-args  "./models/tokens.txt" "./models/encoder_jit_trace-pnnx.ncnn.param" "./models/encoder_jit_trace-pnnx.ncnn.bin" "./models/decoder_jit_trace-pnnx.ncnn.param" "./models/decoder_jit_trace-pnnx.ncnn.bin" "./models/joiner_jit_trace-pnnx.ncnn.param" "./models/joiner_jit_trace-pnnx.ncnn.bin"
(lldb) r
Process 41110 launched: '/Users/video/git/sherpa-ncnn/build/bin/sherpa-ncnn-microphone' (x86_64)
cwd is /Users/video/git/sherpa-ncnn/build
RecognizerConfig(feat_config=FeatureExtractorConfig(sampling_rate=16000, feature_dim=80, max_feature_vectors=200), model_config=ModelConfig(encoder_param="./models/encoder_jit_trace-pnnx.ncnn.param", encoder_bin="./models/encoder_jit_trace-pnnx.ncnn.bin", decoder_param="./models/decoder_jit_trace-pnnx.ncnn.param", decoder_bin="./models/decoder_jit_trace-pnnx.ncnn.bin", joiner_param="./models/joiner_jit_trace-pnnx.ncnn.param", joiner_bin="./models/joiner_jit_trace-pnnx.ncnn.bin", tokens="./models/tokens.txt", encoder num_threads=4, decoder num_threads=4, joiner num_threads=4), decoder_config=DecoderConfig(method="greedy_search", num_active_paths=4), endpoint_config=EndpointConfig(rule1=EndpointRule(must_contain_nonsilence=False, min_trailing_silence=2.4, min_utterance_length=0), rule2=EndpointRule(must_contain_nonsilence=True, min_trailing_silence=1.2, min_utterance_length=0), rule3=EndpointRule(must_contain_nonsilence=False, min_trailing_silence=0, min_utterance_length=300)), enable_endpoint=True)
Disable fp16 for Zipformer encoder
Don't Use GPU. has_gpu: 0, config.use_vulkan_compute: 1
2023-03-09 08:53:08.030861+0800 sherpa-ncnn-microphone[41110:860228] [plugin] AddInstanceForFactory: No factory registered for id <CFUUID 0x600000210200> F8BB1C28-BAE8-11D6-9C31-00039315CD46
Num devices: 3
Use default device: 0
  Name: MacBook Pro Microphone
  Max input channels: 1
Started
libc++abi: terminating with uncaught exception of type std::out_of_range: deque
Process 41110 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGABRT
    frame #0: 0x00007ff80f18b22a libsystem_kernel.dylib`__pthread_kill + 10
libsystem_kernel.dylib`:
->  0x7ff80f18b22a <+10>: jae    0x7ff80f18b234            ; <+20>
    0x7ff80f18b22c <+12>: movq   %rax, %rdi
    0x7ff80f18b22f <+15>: jmp    0x7ff80f184ce2            ; cerror_nocancel
    0x7ff80f18b234 <+20>: retq   
Target 0: (sherpa-ncnn-microphone) stopped.
(lldb) bt
* thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGABRT
  * frame #0: 0x00007ff80f18b22a libsystem_kernel.dylib`__pthread_kill + 10
    frame #1: 0x00007ff80f1c2f7b libsystem_pthread.dylib`pthread_kill + 263
    frame #2: 0x00007ff80f10cca5 libsystem_c.dylib`abort + 123
    frame #3: 0x00007ff80f17d082 libc++abi.dylib`abort_message + 241
    frame #4: 0x00007ff80f16e225 libc++abi.dylib`demangling_terminate_handler() + 242
    frame #5: 0x00007ff80ee6b02b libobjc.A.dylib`_objc_terminate() + 104
    frame #6: 0x00007ff80f17c4a5 libc++abi.dylib`std::__terminate(void (*)()) + 8
    frame #7: 0x00007ff80f17ed05 libc++abi.dylib`__cxxabiv1::failed_throw(__cxxabiv1::__cxa_exception*) + 27
    frame #8: 0x00007ff80f17eccc libc++abi.dylib`__cxa_throw + 116
    frame #9: 0x00000001000c4175 sherpa-ncnn-microphone`std::__1::__throw_out_of_range(__msg="deque") at stdexcept:267:5
    frame #10: 0x00000001000c40d8 sherpa-ncnn-microphone`std::__1::__deque_base_common<true>::__throw_out_of_range(this=0x0000000101c04768) const at deque:930:5
    frame #11: 0x00000001000c37de sherpa-ncnn-microphone`std::__1::deque<std::__1::vector<float, std::__1::allocator<float> >, std::__1::allocator<std::__1::vector<float, std::__1::allocator<float> > > >::at(this=0x0000000101c04768 size=0, __i=18446744073709551613) const at deque:1887:17
    frame #12: 0x00000001000c29b9 sherpa-ncnn-microphone`knf::RecyclingVector::At(this=0x0000000101c04768, index=1824) const at online-feature.cc:47:17
    frame #13: 0x0000000100033bc2 sherpa-ncnn-microphone`knf::OnlineGenericBaseFeature<knf::FbankComputer>::GetFrame(this=0x0000000101c046c0, frame=1824) const at online-feature.h:88:65
    frame #14: 0x0000000100032248 sherpa-ncnn-microphone`sherpa_ncnn::FeatureExtractor::Impl::GetFrames(this=0x0000600003700000, frame_index=1824, n=39) const at features.cc:127:32
    frame #15: 0x000000010003202c sherpa-ncnn-microphone`sherpa_ncnn::FeatureExtractor::GetFrames(this=0x00006000039574d0, frame_index=1824, n=39) const at features.cc:162:17
    frame #16: 0x0000000100070d42 sherpa-ncnn-microphone`sherpa_ncnn::Stream::Impl::GetFrames(this=0x00006000039574d0, frame_index=1824, n=39) const at stream.cc:43:28
    frame #17: 0x0000000100070cfc sherpa-ncnn-microphone`sherpa_ncnn::Stream::GetFrames(this=0x000060000002a8f0, frame_index=1824, n=39) const at stream.cc:88:17
    frame #18: 0x000000010005fdc8 sherpa-ncnn-microphone`sherpa_ncnn::Recognizer::Impl::DecodeStream(this=0x0000000101c04470, s=0x000060000002a8f0) const at recognizer.cc:122:29
    frame #19: 0x000000010005fd25 sherpa-ncnn-microphone`sherpa_ncnn::Recognizer::DecodeStream(this=0x00007ff7bfeff160, s=0x000060000002a8f0) const at recognizer.cc:193:57
    frame #20: 0x0000000100003214 sherpa-ncnn-microphone`main(argc=8, argv=0x00007ff7bfeff768) at sherpa-ncnn-microphone.cc:174:18
    frame #21: 0x00007ff80ee90310 dyld`start + 2432
(lldb) 

(lldb) f 12
frame #12: 0x00000001000c29b9 sherpa-ncnn-microphone`knf::RecyclingVector::At(this=0x0000000101c04768, index=1824) const at online-feature.cc:47:17
   44  	                   << "size = " << Size() << ")";
   45  	  }
   46  	  // 'at' does size checking.
-> 47  	  return items_.at(index - first_available_index_).data();
   48  	}
   49  	
   50  	void RecyclingVector::PushBack(std::vector<float> item) {
(lldb) p index
(int32_t) $0 = 1824
(lldb) p first_available_index_
(int32_t) $1 = 1827
(lldb) 

However, there is a workaround, to run in Release mode with debug compiler flags, you can modify CMakeLists.txt:

if(NOT CMAKE_BUILD_TYPE)
  set(CMAKE_BUILD_TYPE Release)
endif()

# Set the release compiler flags to support debugging.
set(CMAKE_CXX_FLAGS_RELEASE "-g -O0")

Then build and debug it in Release mode:

cmake -DCMAKE_BUILD_TYPE=Release .. && make -j10

If use CLion, you should add a Release profile by CLion > Preferences > Build, Execution, Deployment > CMake > Profiles, then restart CLion and switch to Release profile and debug it.

what is input data format?

I need know what kind of input audio format is, I mean input into ncnn network? such is waveform data with single channel 16k float32, or stft/fft audio data?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.