Code Monkey home page Code Monkey logo

onnxruntime-wav2vec's Introduction

Open In Colab

Install ONNXRuntime

此範例在 linux-x64 上運行 ONNXRuntime。從官方下載動態連接庫後並安裝到系統目錄下。

sudo cp ./onnxruntime-linux-x64-1.12.1/lib/libonnxruntime.so.1.12.1 /usr/local/lib/
sudo ldconfig

Compile

# Intel CPU
g++ wav2vec.cpp read_audio.cpp -o main -I onnxruntime-linux-x64-1.12.1/include -Lonnxruntime-linux-x64-1.12.1/lib -lonnxruntime -std=c++17
g++ silero_en.cpp read_audio.cpp -o main -I onnxruntime-linux-x64-1.12.1/include -Lonnxruntime-linux-x64-1.12.1/lib -lonnxruntime -std=c++17

./main
# Arm CPU
g++ wav2vec.cpp read_audio.cpp -o main -I onnxruntime-linux-aarch64-1.12.1/include -Lonnxruntime-linux-aarch64-1.12.1/lib -lonnxruntime -std=c++17
g++ silero_en.cpp read_audio.cpp -o main -I onnxruntime-linux-aarch64-1.12.1/include -Lonnxruntime-linux-aarch64-1.12.1/lib -lonnxruntime -std=c++17

./main

中文測試資料

  • test1 今天天氣很好出太陽了
  • test2 我早上起床後就去**
  • test3 麥克風測試我今天早上起床吃了一個蛋餅
  • test4 下午我去百貨公司買了一雙鞋子跟一個皮包
  • test5 我今天早上去**非常的開心

英文測試資料

  • test1 (goodmorning this is a beautiful day)
  • test2 (hello what's your name)
  • test3 (an apple a day keeps the doctor away)

Download pre-train model

pre-trained STT models.

wget https://models.silero.ai/models/en/en_v5.onnx -P data
wget https://models.silero.ai/models/en/en_v1_labels.json -p data
gdown "https://drive.google.com/uc?export=download&confirm=no_antivirus&id=1sKUGYv6IDchKDApmtLbWmj3Zbwk_uJ_U"

Reference

onnxruntime-wav2vec's People

Contributors

andy6804tw avatar

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.