From 73ac0e2bbae8c88c8f339fc515a3b40eb939b1fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BD=AD=E9=9C=87=E4=B8=9C?= <275331498@qq.com> Date: Fri, 25 Nov 2022 17:07:33 +0800 Subject: [PATCH] [doc] update doc for wenetruntime (#1585) * [doc] update doc for wenetruntime * fix lint --- runtime/binding/python/README.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/runtime/binding/python/README.md b/runtime/binding/python/README.md index f67bf5f10..b5a86ff85 100644 --- a/runtime/binding/python/README.md +++ b/runtime/binding/python/README.md @@ -21,11 +21,16 @@ pip3 install wenetruntime ## Usage +Note: + +1. For macOS, wenetruntime packed `libtorch.so`, so we can't import torch and wenetruntime at the same time. +2. For Windows and Linux, wenetruntime depends on torch. Please install and import the same version `torch` as wenetruntime. + ### Non-streaming Usage ``` python import sys -import torch # macOS should comment out this line, and uninstall torch. +import torch import wenetruntime as wenet wav_file = sys.argv[1] @@ -67,7 +72,7 @@ decoder = wenet.Decoder(model_dir, ``` python import sys -import torch # macOS should comment out this line, and uninstall torch. +import torch import wave import wenetruntime as wenet