Support specifying providers in Python API (#198)

This commit is contained in:
Fangjun Kuang
2023-07-06 10:14:01 +08:00
committed by GitHub
parent 3a08191a43
commit 33bf8dc1f4
4 changed files with 17 additions and 1 deletions

View File

@@ -72,6 +72,7 @@ class TestOnlineRecognizer(unittest.TestCase):
tokens=tokens,
num_threads=1,
decoding_method=decoding_method,
provider="cpu",
)
s = recognizer.create_stream()
samples, sample_rate = read_wave(wave0)
@@ -115,6 +116,7 @@ class TestOnlineRecognizer(unittest.TestCase):
tokens=tokens,
num_threads=1,
decoding_method=decoding_method,
provider="cpu",
)
streams = []
waves = [wave0, wave1, wave2, wave3, wave4]