GithubHelp home page GithubHelp logo

sipeed / maix-speech Goto Github PK

View Code? Open in Web Editor NEW
311.0 17.0 56.0 21.97 MB

Maix Speech AI lib, a fast and small speech lib running on embedded devices, including ASR, chat, TTS etc.

License: Other

CMake 2.27% Python 68.31% Shell 0.12% C 28.27% Makefile 0.01% C++ 1.03%
asr tts r329 riscv

maix-speech's Introduction

Maix-Speech

中文 | English

Brief

Maix Speech AI lib, a fast and small speech lib running on embedded devices (and PC), including ASR, chat, TTS etc.

Now only support Chinese, See 中文

Build

Clone code by:

git clone https://github.com/sipeed/Maix-Speech

Compile

  • x86x64
cd projects/asr

python project.py clean_conf
python project.py menuconfig

python project.py build
# python project.py build --verbose

./build/asr

python project.py clean
python project.py distclean
# python project.py clean_conf
  • R329
cd projects/asr
python project.py --toolchain /opt/toolchain/bin --toolchain-prefix aarch64-openwrt-linux- config
python project.py menuconfig
python project.py build

More project structure usage

See github.com/Neutree/c_cpp_project_framework

License

Apache 2.0

maix-speech's People

Contributors

neutree avatar sqlpxc avatar zepan 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

maix-speech's Issues

Cross-compile issue

Looks like the build system does not respect toolchain/arch setting in menuconfig. Even I set it to arm, it still tries to use x86 toolchain (host system toolchain).

[ 53%] Building C object asr_lib/CMakeFiles/asr_lib.dir/src/asr.c.o
cc1: error: bad value (‘armv7-a’) for ‘-march=’ switch
cc1: note: valid arguments to ‘-march=’ switch are: nocona core2 nehalem corei7 westmere sandybridge corei7-avx ivybridge core-avx-i haswell core-avx2 broadwell skylake skylake-avx512 cannonlake icelake-client rocketlake icelake-server cascadelake tigerlake cooperlake sapphirerapids alderlake bonnell atom silvermont slm goldmont goldmont-plus tremont knl knm x86-64 x86-64-v2 x86-64-v3 x86-64-v4 eden-x2 nano nano-1000 nano-2000 nano-3000 nano-x2 eden-x4 nano-x4 k8 k8-sse3 opteron opteron-sse3 athlon64 athlon64-sse3 athlon-fx amdfam10 barcelona bdver1 bdver2 bdver3 bdver4 znver1 znver2 znver3 btver1 btver2 native
make[2]: *** [asr_lib/CMakeFiles/asr_lib.dir/build.make:76: asr_lib/CMakeFiles/asr_lib.dir/src/asr.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:246: asr_lib/CMakeFiles/asr_lib.dir/all] Error 2

Build it on speed R329 Fail

/usr/bin/ld: /opt/gits/Maix-Speech/components/asr_lib/lib/aarch64/libms_asr_aarch64.a(ConvolutionCommon.cpp.o): in function MNN::ConvolutionCommon::load(MNN::IDSTQuan const*, bool, bool)': (.text._ZN3MNN17ConvolutionCommon4loadEPKNS_8IDSTQuanEbb+0xf0c): undefined reference to __log_finite'
/usr/bin/ld: /opt/gits/Maix-Speech/components/asr_lib/lib/aarch64/libms_asr_aarch64.a(CPUUnary.cpp.o):(.text._Z8_unaryOpI9UnaryAcosIfEfEvPvPKvi+0x2c): undefined reference to __acosf_finite' /usr/bin/ld: /opt/gits/Maix-Speech/components/asr_lib/lib/aarch64/libms_asr_aarch64.a(CPUUnary.cpp.o):(.text._Z8_unaryOpI9UnaryAsinIfEfEvPvPKvi+0x2c): undefined reference to __asinf_finite'
/usr/bin/ld: /opt/gits/Maix-Speech/components/asr_lib/lib/aarch64/libms_asr_aarch64.a(CPUUnary.cpp.o):(.text._Z8_unaryOpI9UnaryCoshIfEfEvPvPKvi+0x2c): undefined reference to __coshf_finite' /usr/bin/ld: /opt/gits/Maix-Speech/components/asr_lib/lib/aarch64/libms_asr_aarch64.a(CPUUnary.cpp.o):(.text._Z8_unaryOpI10UnaryAtanhIfEfEvPvPKvi+0x2c): undefined reference to __atanhf_finite'
/usr/bin/ld: /opt/gits/Maix-Speech/components/asr_lib/lib/aarch64/libms_asr_aarch64.a(CPUUnary.cpp.o):(.text._Z8_unaryOpI9UnarySinhIfEfEvPvPKvi+0x2c): undefined reference to __sinhf_finite' /usr/bin/ld: /opt/gits/Maix-Speech/components/asr_lib/lib/aarch64/libms_asr_aarch64.a(CPUUnary.cpp.o):(.text._Z8_unaryOpI10UnaryAcoshIfEfEvPvPKvi+0x2c): undefined reference to __acoshf_finite'
/usr/bin/ld: /opt/gits/Maix-Speech/components/asr_lib/lib/aarch64/libms_asr_aarch64.a(CPUUnary.cpp.o):(.text._Z8_unaryOpI10UnaryLog1pIfEfEvPvPKvi+0x38): undefined reference to __logf_finite' /usr/bin/ld: /opt/gits/Maix-Speech/components/asr_lib/lib/aarch64/libms_asr_aarch64.a(CPUUnary.cpp.o):(.text._Z8_unaryOpI8UnaryLogIfEfEvPvPKvi+0x2c): undefined reference to __logf_finite'
/usr/bin/ld: /opt/gits/Maix-Speech/components/asr_lib/lib/aarch64/libms_asr_aarch64.a(CPUUnary.cpp.o):(.text._Z8_unaryOpI9UnaryBNLLIfEfEvPvPKvi+0x44): undefined reference to __exp_finite' /usr/bin/ld: /opt/gits/Maix-Speech/components/asr_lib/lib/aarch64/libms_asr_aarch64.a(CPUUnary.cpp.o):(.text._Z8_unaryOpI9UnaryBNLLIfEfEvPvPKvi+0x4c): undefined reference to __log_finite'
/usr/bin/ld: /opt/gits/Maix-Speech/components/asr_lib/lib/aarch64/libms_asr_aarch64.a(CPUUnary.cpp.o):(.text._Z8_unaryOpI9UnaryBNLLIfEfEvPvPKvi+0x58): undefined reference to __exp_finite' /usr/bin/ld: /opt/gits/Maix-Speech/components/asr_lib/lib/aarch64/libms_asr_aarch64.a(CPUUnary.cpp.o):(.text._Z8_unaryOpI9UnaryBNLLIfEfEvPvPKvi+0x60): undefined reference to __log_finite'
/usr/bin/ld: /opt/gits/Maix-Speech/components/asr_lib/lib/aarch64/libms_asr_aarch64.a(CPUUnary.cpp.o): in function float erfcImpl<float>(float)': (.text._Z8erfcImplIfET_S0_[_Z8erfcImplIfET_S0_]+0x40): undefined reference to __expf_finite'
/usr/bin/ld: /opt/gits/Maix-Speech/components/asr_lib/lib/aarch64/libms_asr_aarch64.a(CPUBinary.cpp.o): in function void MNN::execute<float, float, BinaryPow<float, float, float> >(void*, void const*, void const*, int, int)': (.text._ZN3MNN7executeIff9BinaryPowIfffEEEvPvPKvS5_ii[_ZN3MNN7executeIff9BinaryPowIfffEEEvPvPKvS5_ii]+0x38): undefined reference to __powf_finite'
/usr/bin/ld: (.text._ZN3MNN7executeIff9BinaryPowIfffEEEvPvPKvS5_ii[_ZN3MNN7executeIff9BinaryPowIfffEEEvPvPKvS5_ii]+0x84): undefined reference to __powf_finite' /usr/bin/ld: (.text._ZN3MNN7executeIff9BinaryPowIfffEEEvPvPKvS5_ii[_ZN3MNN7executeIff9BinaryPowIfffEEEvPvPKvS5_ii]+0xc4): undefined reference to __powf_finite'
/usr/bin/ld: /opt/gits/Maix-Speech/components/asr_lib/lib/aarch64/libms_asr_aarch64.a(CPUDetectionPostProcess.cpp.o): in function MNN::CPUDetectionPostProcess::onExecute(std::vector<MNN::Tensor*, std::allocator<MNN::Tensor*> > const&, std::vector<MNN::Tensor*, std::allocator<MNN::Tensor*> > const&)': (.text._ZN3MNN23CPUDetectionPostProcess9onExecuteERKSt6vectorIPNS_6TensorESaIS3_EES7_+0x128): undefined reference to __expf_finite'
/usr/bin/ld: (.text.ZN3MNN23CPUDetectionPostProcess9onExecuteERKSt6vectorIPNS_6TensorESaIS3_EES7+0x140): undefined reference to __expf_finite' /usr/bin/ld: /opt/gits/Maix-Speech/components/asr_lib/lib/aarch64/libms_asr_aarch64.a(CPUDetectionOutput.cpp.o): in function MNN::CPUDetectionOutput::onExecute(std::vector<MNN::Tensor*, std::allocatorMNN::Tensor* > const&, std::vector<MNN::Tensor*, std::allocatorMNN::Tensor* > const&)':
(.text.ZN3MNN18CPUDetectionOutput9onExecuteERKSt6vectorIPNS_6TensorESaIS3_EES7+0x414): undefined reference to __expf_finite' /usr/bin/ld: (.text._ZN3MNN18CPUDetectionOutput9onExecuteERKSt6vectorIPNS_6TensorESaIS3_EES7_+0x42c): undefined reference to __expf_finite'
/usr/bin/ld: (.text.ZN3MNN18CPUDetectionOutput9onExecuteERKSt6vectorIPNS_6TensorESaIS3_EES7+0xd90): undefined reference to __expf_finite' /usr/bin/ld: /opt/gits/Maix-Speech/components/asr_lib/lib/aarch64/libms_asr_aarch64.a(CPUDetectionOutput.cpp.o):(.text._ZN3MNN18CPUDetectionOutput9onExecuteERKSt6vectorIPNS_6TensorESaIS3_EES7_+0xda8): more undefined references to __expf_finite' follow
/usr/bin/ld: /opt/gits/Maix-Speech/components/asr_lib/lib/aarch64/libms_asr_aarch64.a(WingoradGenerater.cpp.o):(.text._ZN3MNN4MathL8computeAEPKfii+0x15c): undefined reference to __powf_finite' /usr/bin/ld: /opt/gits/Maix-Speech/components/asr_lib/lib/aarch64/libms_asr_aarch64.a(WingoradGenerater.cpp.o): in function MNN::Math::WinogradGenerater::WinogradGenerater(int, int, float, bool)':
(.text._ZN3MNN4Math17WinogradGeneraterC2Eiifb+0x7c4): undefined reference to `__powf_finite'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/maix_asr.dir/build.make:111:maix_asr] 错误 1
make[1]: *** [CMakeFiles/Makefile2:190:CMakeFiles/maix_asr.dir/all] 错误 2
make: *** [Makefile:103:all] 错误 2
root@zmaixsense:/opt/gits/Maix-Speech/projects/maix_asr#

root@zmaixsense:/opt/gits/Maix-Speech/projects/maix_asr# uname -a
Linux zmaixsense 5.14.0-rc7-sun50iw11 #trunk SMP Tue Mar 1 10:28:19 CST 2022 aarch64 GNU/Linux
root@zmaixsense:/opt/gits/Maix-Speech/projects/maix_asr#

this is not CROSS BUILD ,thank you .

Fails on 1st Attempt - Windows

There are no instructions for whether this runs on linux or Windows that I could see.

Trying the build on Windows, and as expected, the very first thing I tried fails ...

`G:\SDK_FW_3rd\3rdRepos\Maix-Speech\projects\maix_asr>python project.py menuconfig
-- SDK_PATH:G:\SDK_FW_3rd\3rdRepos\Maix-Speech
-- project name: maix_asr

Traceback (most recent call last):

File ".\project.py", line 27, in
exec(f.read())

File "", line 186, in

File "U:\Tools\PythonWin\WPy64-3890\python-3.8.9.amd64\lib\subprocess.py", line 340, in call
with Popen(*popenargs, **kwargs) as p:

File "U:\Tools\PythonWin\WPy64-3890\python-3.8.9.amd64\lib\subprocess.py", line 858, in init self._execute_child(args, executable, preexec_fn, close_fds,

File "U:\Tools\PythonWin\WPy64-3890\python-3.8.9.amd64\lib\subprocess.py", line 1311, in _execute_child hp, ht, pid, tid = _winapi.CreateProcess(executable, args,

FileNotFoundError: [WinError 2] The system cannot find the file specified `

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.