Open Caet-pip opened 1 year ago
Please install visual studio first.
I am running command prompt terminal in Visual Studio Code
Visual studio code is not visual studio.
Please install visual studio first. You can install a community edition, which is free.
I have installed Visual Studio but still getting the same error. Should I install something specific in Visual Studio? Should I install Cmake from Visual Studio?
Please activate the visual studio developer command prompt. It is different from cmd
.
C:\Users\Fawaz Shaik\K2\sherpa-onnx\build>cmake -DCMAKE_BUILD_TYPE=Release .. 'cmake' is not recognized as an internal or external command, operable program or batch file.
I get this as result in Visual Studio Developer Command Prompt
Then, please install cmake.
The easiest way might be
pip install cmake
Getting this when I try installing (base) C:\Users\Fawaz Shaik\source\repos>pip install cmake Requirement already satisfied: cmake in c:\users\fawaz shaik\appdata\roaming\python\python310\site-packages (3.26.4)
and when I try running the command:
(base) C:\Users\Fawaz Shaik\K2\sherpa-onnx\build>cmake -DCMAKE_BUILD_TYPE=Release .. CMake Error at CMakeLists.txt:2 (project): Running
'nmake' '-?'
failed with:
The system cannot find the file specified
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage -- Configuring incomplete, errors occurred! See also "C:/Users/Fawaz Shaik/K2/sherpa-onnx/build/CMakeFiles/CMakeOutput.log".
in CMakeOutput.log I get this The system is: Windows - 10.0.22621 - AMD64
Could you describe how you start the terminal?
In Visual Studio App from the toolbar on top
Tools > Command Line > Developer Command Prompt
What is the output of
cmake --help
this is the output
(base) C:\Users\Fawaz Shaik\K2\sherpa-onnx\build>cmake --help Usage
cmake [options]
Specify a source directory to (re-)generate a build system for it in the current working directory. Specify an existing build directory to re-generate its build system.
Options
-S
Generators
The following generators are available on this platform (* marks default): Visual Studio 17 2022 = Generates Visual Studio 2022 project files. Use -A option to specify architecture. Visual Studio 16 2019 = Generates Visual Studio 2019 project files. Use -A option to specify architecture. Visual Studio 15 2017 [arch] = Generates Visual Studio 2017 project files. Optional [arch] can be "Win64" or "ARM". Visual Studio 14 2015 [arch] = Generates Visual Studio 2015 project files. Optional [arch] can be "Win64" or "ARM". Visual Studio 12 2013 [arch] = Generates Visual Studio 2013 project files. Optional [arch] can be "Win64" or "ARM". Visual Studio 11 2012 [arch] = Generates Visual Studio 2012 project files. Optional [arch] can be "Win64" or "ARM". Visual Studio 10 2010 [arch] = Deprecated. Generates Visual Studio 2010 project files. Optional [arch] can be "Win64" or "IA64". Visual Studio 9 2008 [arch] = Generates Visual Studio 2008 project files. Optional [arch] can be "Win64" or "IA64". Borland Makefiles = Generates Borland makefiles.
From the output of cmake --help
, please do the following
cd build
cmake -G "Visual Studio 17 2022" -DCMAKE_BUILD_TYPE=Release ..
I get this output
(base) C:\Users\Fawaz Shaik\K2\sherpa-onnx>mkdir build
(base) C:\Users\Fawaz Shaik\K2\sherpa-onnx>cd build
(base) C:\Users\Fawaz Shaik\K2\sherpa-onnx\build> cmake -G "Visual Studio 17 2022" -DCMAKE_BUILD_TYPE=Release .. CMake Error at CMakeLists.txt:2 (project): Generator
Visual Studio 17 2022
could not find any instance of Visual Studio.
-- Configuring incomplete, errors occurred! See also "C:/Users/Fawaz Shaik/K2/sherpa-onnx/build/CMakeFiles/CMakeOutput.log".
this is in logs The system is: Windows - 10.0.22621 - AMD64
How did you install visual studio?
The error logs show that you have not installed or configured visual studio correctly.
We have a video demo for installing sherpa-ncnn on windows. Even if it is made for sherpa-ncnn, you can also use it for sherpa-onnx. https://k2-fsa.github.io/sherpa/ncnn/install/videos.html
I think after seeing the video that I had to download extra C++ stuff, I will do that and check again. Thanks!
I finally got it to work, but when trying one of the streaming models from https://k2-fsa.github.io/sherpa/onnx/pretrained_models/online-transducer/zipformer-transducer-models.html#csukuangfj-sherpa-onnx-streaming-zipformer-bilingual-zh-en-2023-02-20-bilingual-chinese-english I get this error
(base) C:\Users\Fawaz Shaik\K2\sherpa-onnx>GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/csukuangfj/sherpa-onnx-streaming-zipformer-bilingual-zh-en-2023-02-20 'GIT_LFS_SKIP_SMUDGE' is not recognized as an internal or external command, operable program or batch file.
For windows, you can remove GIT_LFS_SKIP_SMUDGE=1
and just run
git clone https://huggingface.co/csukuangfj/sherpa-onnx-streaming-zipformer-bilingual-zh-en-2023-02-20
We need to update the doc to mention that.
Okay thanks
ls -lh doesnt work in windows
and when i Try running the command for micriphone
Real-time speech recognition from a microphone cd /path/to/sherpa-onnx
./build/bin/sherpa-onnx-microphone \ ./sherpa-onnx-streaming-zipformer-bilingual-zh-en-2023-02-20/tokens.txt \ ./sherpa-onnx-streaming-zipformer-bilingual-zh-en-2023-02-20/encoder-epoch-99-avg-1.onnx \ ./sherpa-onnx-streaming-zipformer-bilingual-zh-en-2023-02-20/decoder-epoch-99-avg-1.onnx \ ./sherpa-onnx-streaming-zipformer-bilingual-zh-en-2023-02-20/joiner-epoch-99-avg-1.onnx
I get a warning for pasting multuple lines of text
Could you post screenshots?
This is screenshot
Please remove \ and put all commands in a single line
Please read the documentation carefully. For windows the doc has explicitly documented which executable to use.
Hello, I read the documentation and the python code worked for me. In https://k2-fsa.github.io/sherpa/onnx/pretrained_models/online-transducer/lstm-transducer-models.html I have added ./build/bin/Release/sherpa-onnx.exe before the code ./build/bin/sherpa-onnx-microphone ./sherpa-onnx-lstm-en-2023-02-17/tokens.txt ./sherpa-onnx-lstm-en-2023-02-17/encoder-epoch-99-avg-1.onnx ./sherpa-onnx-lstm-en-2023-02-17/decoder-epoch-99-avg-1.onnx ./sherpa-onnx-lstm-en-2023-02-17/joiner-epoch-99-avg-1.onnx but it still doesnt run it gives:
(base) C:\Users\Fawaz Shaik\K2\sherpa-onnx>./build/bin/Release/sherpa-onnx.exe ./build/bin/Release/sherpa-onnx.exe ./build/bin/sherpa-onnx-microphone ./sherpa-onnx-lstm-en-2023-02-17/tokens.txt ./sherpa-onnx-lstm-en-2023-02-17/encoder-epoch-99-avg-1.onnx ./sherpa-onnx-lstm-en-2023-02-17/decoder-epoch-99-avg-1.onnx ./sherpa-onnx-lstm-en-2023-02-17/joiner-epoch-99-avg-1.onnx '.' is not recognized as an internal or external command, operable program or batch file.
What is the output of
./build/bin/Release/sherpa-onnx-microphone.exe ./sherpa-onnx-lstm-en-2023-02-17/tokens.txt ./sherpa-onnx-lstm-en-2023-02-17/encoder-epoch-99-avg-1.onnx ./sherpa-onnx-lstm-en-2023-02-17/decoder-epoch-99-avg-1.onnx ./sherpa-onnx-lstm-en-2023-02-17/joiner-epoch-99-avg-1.onnx
I get this output
Is it because this is in C? I am well aware of python but not experienced in C apologies
(base) C:\Users\Fawaz Shaik\K2\sherpa-onnx>./build/bin/Release/sherpa-onnx-microphone.exe ./sherpa-onnx-lstm-en-2023-02-17/tokens.txt ./sherpa-onnx-lstm-en-2023-02-17/encoder-epoch-99-avg-1.onnx ./sherpa-onnx-lstm-en-2023-02-17/decoder-epoch-99-avg-1.onnx ./sherpa-onnx-lstm-en-2023-02-17/joiner-epoch-99-avg-1.onnx '.' is not recognized as an internal or external command, operable program or batch file.
Are you able to locate the generated exe?
@mlcatinit
Have you managed to run it?
(base) C:\Users\K2\sherpa-onnx\build>cmake -DCMAKE_BUILD_TYPE=Release .. -- Building for: NMake Makefiles CMake Error at CMakeLists.txt:2 (project): Running
'nmake' '-?'
failed with:
The system cannot find the file specified
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage -- Configuring incomplete, errors occurred! See also "C:/Users/K2/sherpa-onnx/build/CMakeFiles/CMakeOutput.log".