Skip to content

Commit

Permalink
Put the demo into main folder
Browse files Browse the repository at this point in the history
  • Loading branch information
nshmyrev committed Dec 24, 2021
1 parent 93e81c3 commit 72bf210
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 93 deletions.
90 changes: 0 additions & 90 deletions python/example/batch/asr_server_gpu.py

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
for i, fd in enumerate(fds):
if i in ended:
continue
data = fd.read(8000)
data = fd.read(16000)
if len(data) == 0:
rec.FinishStream(i)
ended.add(i)
Expand Down
5 changes: 3 additions & 2 deletions src/batch_recognizer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,10 @@ BatchRecognizer::BatchRecognizer() {
batched_decoder_config.Register(&po);
po.ReadConfigFile("model/conf/model.conf");

batched_decoder_config.num_worker_threads = 4;
batched_decoder_config.max_batch_size = 100;
batched_decoder_config.num_worker_threads = -1;
batched_decoder_config.max_batch_size = 200;
batched_decoder_config.reset_on_endpoint = true;
batched_decoder_config.use_gpu_feature_extraction = true;

batched_decoder_config.feature_opts.feature_type = "mfcc";
batched_decoder_config.feature_opts.mfcc_config = "model/conf/mfcc.conf";
Expand Down
2 changes: 2 additions & 0 deletions src/vosk_api.cc
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,8 @@ void vosk_set_log_level(int log_level)
void vosk_gpu_init()
{
#if HAVE_CUDA
// kaldi::CuDevice::EnableTensorCores(true);
// kaldi::CuDevice::EnableTf32Compute(true);
kaldi::CuDevice::Instantiate().SelectGpuId("yes");
kaldi::CuDevice::Instantiate().AllowMultithreading();
#endif
Expand Down

0 comments on commit 72bf210

Please sign in to comment.