Compare commits

...

14 Commits

Author SHA1 Message Date
Nickolay Shmyrev a7bf6a51e2 Bump version 2024-04-22 14:39:57 +02:00
Nickolay Shmyrev 72797111db Fix timeouts for endpointer 2024-04-22 14:29:39 +02:00
__Rylex__ 40937b6bcb Kaldi remove lm target because rnnlm has lm (#1543)
* Update Dockerfile.win

* Update Dockerfile.dockcross

* Update Dockerfile.manylinux

* Update Dockerfile.dockcross-manylinux

* Update Dockerfile.manylinux-mkl

* Update Dockerfile.win32

* Update build-vosk.sh
2024-04-01 15:58:09 +03:00
Nickolay Shmyrev 7da70c6107 Add test for ITN 2024-03-29 12:57:01 +01:00
Nickolay Shmyrev 2426225d74 Add postprocessor 2024-03-29 12:44:54 +01:00
Nickolay V. Shmyrev c4d32a2293 Inverse text normalization with FSTs (#1545)
* Add ITN from Wetext
2024-03-29 14:32:05 +03:00
__Rylex__ 6f7fe0e417 fix typp (#1519) 2024-02-21 11:00:19 +03:00
Nickolay Shmyrev aba84973b1 Update to latest gradio 2023-12-15 00:23:37 +01:00
Nickolay Shmyrev 339b1c5d00 Fix t_max endpointer config and introduce t_start_max for silent inputs. 2023-12-13 04:45:30 +01:00
Nickolay Shmyrev a35728fa67 Simplify server argument 2023-11-27 15:40:58 +01:00
Nickolay Shmyrev 322a57b512 Fix json output format 2023-11-27 15:39:49 +01:00
Gonzalo a21d1ad051 feat: enable usage of remote server and not only localhost (#1375) 2023-11-27 17:22:59 +03:00
Nickolay Shmyrev a47fa9147b Add endpointer delays parameter 2023-11-27 15:29:31 +01:00
Wire dfb76f0126 go: do not include libdl if building on Windows (#1464) 2023-11-12 01:26:17 +03:00
31 changed files with 350 additions and 77 deletions
+1 -1
View File
@@ -10,7 +10,7 @@ buildscript {
}
allprojects {
version = '0.3.47'
version = '0.3.50'
}
subprojects {
+1 -1
View File
@@ -118,7 +118,7 @@ CXX=$CXX AR=$AR RANLIB=$RANLIB CXXFLAGS="$ARCHFLAGS -O3 -DFST_NO_DYNAMIC_LINKING
--fst-root=${WORKDIR}/local --fst-version=${OPENFST_VERSION}
make -j 8 depend
cd $WORKDIR/kaldi/src
make -j 8 online2 lm rnnlm
make -j 8 online2 rnnlm
# Vosk-api
cd $WORKDIR
+1 -1
View File
@@ -11,7 +11,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Vosk" Version="0.3.45" />
<PackageReference Include="Vosk" Version="0.3.50" />
</ItemGroup>
</Project>
+1 -1
View File
@@ -2,7 +2,7 @@
<package>
<metadata>
<id>Vosk</id>
<version>0.3.45</version>
<version>0.3.50</version>
<authors>Alpha Cephei Inc</authors>
<owners>Alpha Cephei Inc</owners>
<license type="expression">Apache-2.0</license>
+2 -1
View File
@@ -1,7 +1,8 @@
package vosk
// #cgo CPPFLAGS: -I ${SRCDIR}/../src
// #cgo LDFLAGS: -L ${SRCDIR}/../src -lvosk -ldl -lpthread
// #cgo !windows LDFLAGS: -L ${SRCDIR}/../src -lvosk -ldl -lpthread
// #cgo windows LDFLAGS: -L ${SRCDIR}/../src -lvosk -lpthread
// #include <stdlib.h>
// #include <vosk_api.h>
import "C"
+1 -1
View File
@@ -11,5 +11,5 @@ repositories {
}
dependencies {
implementation group: 'com.alphacephei', name: 'vosk', version: '0.3.45'
implementation group: 'com.alphacephei', name: 'vosk', version: '0.3.50'
}
+1 -1
View File
@@ -16,7 +16,7 @@ repositories {
archivesBaseName = 'vosk'
group = 'com.alphacephei'
version = '0.3.45'
version = '0.3.50'
mavenPublish {
group = 'com.alphacephei'
+1 -1
View File
@@ -26,7 +26,7 @@ plugins {
}
group = "com.alphacephei"
version = "0.4.0-alpha0"
version = "0.3.50"
repositories {
google()
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "vosk",
"version": "0.3.45",
"version": "0.3.50",
"description": "Node binding for continuous offline voice recoginition with Vosk library.",
"repository": {
"type": "git",
+55
View File
@@ -0,0 +1,55 @@
#!/usr/bin/env python3
import wave
import sys
from vosk import Model, KaldiRecognizer, SetLogLevel, EndpointerMode
# You can set log level to -1 to disable debug messages
SetLogLevel(0)
wf = wave.open(sys.argv[1], "rb")
if wf.getnchannels() != 1 or wf.getsampwidth() != 2 or wf.getcomptype() != "NONE":
print("Audio file must be WAV format mono PCM.")
sys.exit(1)
model = Model(lang="en-us")
# You can also init model by name or with a folder path
# model = Model(model_name="vosk-model-en-us-0.21")
# model = Model("models/en")
rec = KaldiRecognizer(model, wf.getframerate())
rec.SetWords(True)
rec.SetPartialWords(True)
rec.SetEndpointerMode(EndpointerMode.VERY_LONG)
while True:
data = wf.readframes(4000)
if len(data) == 0:
break
if rec.AcceptWaveform(data):
print(rec.Result())
else:
print(rec.PartialResult())
print(rec.FinalResult())
wf = wave.open(sys.argv[1], "rb")
if wf.getnchannels() != 1 or wf.getsampwidth() != 2 or wf.getcomptype() != "NONE":
print("Audio file must be WAV format mono PCM.")
sys.exit(1)
rec.SetEndpointerDelays(0.5, 0.3, 10.0)
while True:
data = wf.readframes(4000)
if len(data) == 0:
break
if rec.AcceptWaveform(data):
print(rec.Result())
else:
print(rec.PartialResult())
print(rec.FinalResult())
+39 -40
View File
@@ -1,40 +1,39 @@
#!/usr/bin/env python3
import json
import gradio as gr
from vosk import KaldiRecognizer, Model
model = Model(lang="en-us")
def transcribe(data, state):
sample_rate, audio_data = data
audio_data = (audio_data >> 16).astype("int16").tobytes()
if state is None:
rec = KaldiRecognizer(model, sample_rate)
result = []
else:
rec, result = state
if rec.AcceptWaveform(audio_data):
text_result = json.loads(rec.Result())["text"]
if text_result != "":
result.append(text_result)
partial_result = ""
else:
partial_result = json.loads(rec.PartialResult())["partial"] + " "
return "\n".join(result) + "\n" + partial_result, (rec, result)
gr.Interface(
fn=transcribe,
inputs=[
gr.Audio(source="microphone", type="numpy", streaming=True),
"state"
],
outputs=[
"textbox",
"state"
],
live=True).launch(share=True)
#!/usr/bin/env python3
import json
import gradio as gr
from vosk import KaldiRecognizer, Model
model = Model(lang="en-us")
def transcribe(stream, new_chunk):
sample_rate, audio_data = new_chunk
audio_data = audio_data.tobytes()
if stream is None:
rec = KaldiRecognizer(model, sample_rate)
result = []
else:
rec, result = stream
if rec.AcceptWaveform(audio_data):
text_result = json.loads(rec.Result())["text"]
if text_result != "":
result.append(text_result)
partial_result = ""
else:
partial_result = json.loads(rec.PartialResult())["partial"] + " "
return (rec, result), "\n".join(result) + "\n" + partial_result
gr.Interface(
fn=transcribe,
inputs=[
"state", gr.Audio(sources=["microphone"], type="numpy", streaming=True),
],
outputs=[
"state", "text",
],
live=True).launch(share=True)
+11
View File
@@ -0,0 +1,11 @@
#!/usr/bin/env python3
import wave
import sys
from vosk import Processor
proc = Processor("ru_itn_tagger.fst", "ru_itn_verbalizer.fst")
print (proc.process("у нас десять яблок"))
print (proc.process("у нас десять яблок и десять миллилитров воды точка"))
print (proc.process("мы пришли в восемь часов пять минут"))
+1 -1
View File
@@ -45,7 +45,7 @@ with open("README.md", "rb") as fh:
setuptools.setup(
name="vosk",
version="0.3.45",
version="0.3.50",
author="Alpha Cephei Inc",
author_email="contact@alphacephei.com",
description="Offline open source speech recognition API based on Kaldi and Vosk",
+21 -3
View File
@@ -142,10 +142,11 @@ class SpkModel:
def __del__(self):
_c.vosk_spk_model_free(self._handle)
class EpMode(enum.Enum):
class EndpointerMode(enum.Enum):
DEFAULT = 0
SHORT = 1
LONG = 2
VERY_LONG = 3
class KaldiRecognizer:
@@ -179,8 +180,11 @@ class KaldiRecognizer:
def SetNLSML(self, enable_nlsml):
_c.vosk_recognizer_set_nlsml(self._handle, 1 if enable_nlsml else 0)
def SetEpMode(self, mode):
_c.vosk_recognizer_set_ep_mode(self._handle, mode.value)
def SetEndpointerMode(self, mode):
_c.vosk_recognizer_set_endpointer_mode(self._handle, mode.value)
def SetEndpointerDelays(self, t_start_max, t_end, t_max):
_c.vosk_recognizer_set_endpointer_delays(self._handle, t_start_max, t_end, t_max)
def SetSpkModel(self, spk_model):
_c.vosk_recognizer_set_spk_model(self._handle, spk_model._handle)
@@ -283,3 +287,17 @@ class BatchRecognizer:
def GetPendingChunks(self):
return _c.vosk_batch_recognizer_get_pending_chunks(self._handle)
class Processor:
def __init__(self, *args):
self._handle = _c.vosk_text_processor_new(args[0].encode('utf-8'), args[1].encode('utf-8'))
if self._handle == _ffi.NULL:
raise Exception("Failed to create processor")
def __del__(self):
_c.vosk_text_processor_free(self._handle)
def process(self, text):
return _ffi.string(_c.vosk_text_processor_itn(self._handle, text.encode('utf-8'))).decode('utf-8')
+2 -2
View File
@@ -15,8 +15,8 @@ parser.add_argument(
"--model", "-m", type=str,
help="model path")
parser.add_argument(
"--server", "-s", const="ws://localhost:2700", action="store_const",
help="use server for recognition")
"--server", "-s", type=str,
help="use server for recognition. For example ws://localhost:2700")
parser.add_argument(
"--list-models", default=False, action="store_true",
help="list available models")
+1 -1
View File
@@ -99,7 +99,7 @@ class Transcriber:
monologues = {"schemaVersion":"2.0", "monologues":[], "text":[]}
for part in result:
if part["text"] != "":
monologues["text"] += part["text"]
monologues["text"] += [part["text"]]
for _, res in enumerate(result):
if not "result" in res:
continue
+1 -1
View File
@@ -1,6 +1,6 @@
Gem::Specification.new do |s|
s.name = "vosk"
s.version = "0.3.45"
s.version = "0.3.50"
s.summary = "Offline speech recognition API"
s.description = "Vosk is an offline open source speech recognition toolkit. It enables speech recognition for 20+ languages and dialects - English, Indian English, German, French, Spanish, Portuguese, Chinese, Russian, Turkish, Vietnamese, Italian, Dutch, Catalan, Arabic, Greek, Farsi, Filipino, Ukrainian, Kazakh, Swedish, Japanese, Esperanto, Hindi, Czech, Polish. More to come."
s.authors = ["Alpha Cephei Inc"]
+5 -4
View File
@@ -23,17 +23,18 @@ VOSK_SOURCES= \
language_model.cc \
model.cc \
spk_model.cc \
vosk_api.cc
vosk_api.cc \
postprocessor.cc
VOSK_HEADERS= \
recognizer.h \
language_model.h \
model.h \
spk_model.h \
vosk_api.h
vosk_api.h \
postprocessor.h
CFLAGS=-g -O3 -std=c++17 -Wno-deprecated-declarations -fPIC -DFST_NO_DYNAMIC_LINKING \
-I. -I$(KALDI_ROOT)/src -I$(OPENFST_ROOT)/include $(EXTRA_CFLAGS)
CFLAGS=-g -O3 -std=c++17 -Wno-deprecated-declarations -fPIC -DFST_NO_DYNAMIC_LINKING -I. -I$(KALDI_ROOT)/src -I$(OPENFST_ROOT)/include $(EXTRA_CFLAGS)
LDFLAGS=
+66
View File
@@ -0,0 +1,66 @@
// Copyright (c) 2022 Zhendong Peng (pzd17@tsinghua.org.cn)
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#include "postprocessor.h"
using fst::TokenType;
Processor::Processor(const std::string& tagger_path,
const std::string& verbalizer_path) {
tagger_.reset(StdVectorFst::Read(tagger_path));
verbalizer_.reset(StdVectorFst::Read(verbalizer_path));
compiler_ = std::make_shared<StringCompiler<StdArc>>(TokenType::BYTE);
printer_ = std::make_shared<StringPrinter<StdArc>>(TokenType::BYTE);
}
std::string Processor::ShortestPath(const StdVectorFst& lattice) {
StdVectorFst shortest_path;
fst::ShortestPath(lattice, &shortest_path, 1, true);
std::string output;
printer_->operator()(shortest_path, &output);
return output;
}
std::string Processor::Compose(const std::string& input,
const StdVectorFst* fst) {
StdVectorFst input_fst;
compiler_->operator()(input, &input_fst);
StdVectorFst lattice;
fst::Compose(input_fst, *fst, &lattice);
return ShortestPath(lattice);
}
std::string Processor::Tag(const std::string& input) {
if (input.empty()) {
return "";
}
return Compose(input, tagger_.get());
}
std::string Processor::Verbalize(const std::string& input) {
if (input.empty()) {
return "";
}
std::string output = Compose(input, verbalizer_.get());
output.erase(std::remove(output.begin(), output.end(), '\0'), output.end());
return output;
}
std::string Processor::Normalize(const std::string& input) {
return Verbalize(Tag(input));
}
+45
View File
@@ -0,0 +1,45 @@
// Copyright (c) 2022 Zhendong Peng (pzd17@tsinghua.org.cn)
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#ifndef PROCESSOR_WETEXT_PROCESSOR_H_
#define PROCESSOR_WETEXT_PROCESSOR_H_
#include <memory>
#include <string>
#include "fst/fstlib.h"
using fst::StdArc;
using fst::StdVectorFst;
using fst::StringCompiler;
using fst::StringPrinter;
class Processor {
public:
Processor(const std::string& tagger_path, const std::string& verbalizer_path);
std::string Tag(const std::string& input);
std::string Verbalize(const std::string& input);
std::string Normalize(const std::string& input);
private:
std::string ShortestPath(const StdVectorFst& lattice);
std::string Compose(const std::string& input, const StdVectorFst* fst);
std::shared_ptr<StdVectorFst> tagger_ = nullptr;
std::shared_ptr<StdVectorFst> verbalizer_ = nullptr;
std::shared_ptr<StringCompiler<StdArc>> compiler_ = nullptr;
std::shared_ptr<StringPrinter<StdArc>> printer_ = nullptr;
};
#endif // PROCESSOR_WETEXT_PROCESSOR_H_
+25 -4
View File
@@ -220,7 +220,7 @@ void Recognizer::SetNLSML(bool nlsml)
nlsml_ = nlsml;
}
void Recognizer::SetEpMode(int mode)
void Recognizer::SetEndpointerMode(int mode)
{
float scale = 1.0;
switch(mode) {
@@ -230,16 +230,37 @@ void Recognizer::SetEpMode(int mode)
case 2:
scale = 1.50;
break;
default:
case 3:
scale = 4.0;
break;
}
KALDI_LOG << "Endpointer Scale " << scale;
KALDI_LOG << "Updating endpointer scale " << scale;
endpoint_config_ = model_->endpoint_config_;
endpoint_config_.rule2.min_trailing_silence *= scale;
endpoint_config_.rule3.min_trailing_silence *= scale;
endpoint_config_.rule4.min_trailing_silence *= scale;
}
void Recognizer::SetEndpointerDelays(float t_start_max, float t_end, float t_max)
{
float rule1, rule2, rule3, rule4, rule5;
rule1 = t_start_max;
rule2 = t_end;
rule3 = t_end + 0.5;
rule4 = t_end + 1.0;
rule5 = t_max;
KALDI_LOG << "Updating endpointer delays " << rule1 << "," << rule2 << "," << rule3 << "," << rule4 << "," << rule5;
endpoint_config_ = model_->endpoint_config_;
endpoint_config_.rule1.min_trailing_silence = rule1;
endpoint_config_.rule2.min_trailing_silence = rule2;
endpoint_config_.rule3.min_trailing_silence = rule3;
endpoint_config_.rule4.min_trailing_silence = rule4;
endpoint_config_.rule5.min_utterance_length = rule5;
}
void Recognizer::SetSpkModel(SpkModel *spk_model)
{
if (state_ == RECOGNIZER_RUNNING) {
@@ -254,7 +275,7 @@ void Recognizer::SetSpkModel(SpkModel *spk_model)
void Recognizer::SetGrm(char const *grammar)
{
if (state_ == RECOGNIZER_RUNNING) {
KALDI_ERR << "Can't add speaker model to already running recognizer";
KALDI_ERR << "Can't add grammar to already running recognizer";
return;
}
+2 -1
View File
@@ -52,7 +52,8 @@ class Recognizer {
void SetWords(bool words);
void SetPartialWords(bool partial_words);
void SetNLSML(bool nlsml);
void SetEpMode(int mode);
void SetEndpointerMode(int mode);
void SetEndpointerDelays(float t_start_max, float t_end, float t_max);
bool AcceptWaveform(const char *data, int len);
bool AcceptWaveform(const short *sdata, int len);
bool AcceptWaveform(const float *fdata, int len);
+36 -2
View File
@@ -17,6 +17,7 @@
#include "recognizer.h"
#include "model.h"
#include "spk_model.h"
#include "postprocessor.h"
#if HAVE_CUDA
#include "cudamatrix/cu-device.h"
@@ -129,12 +130,20 @@ void vosk_recognizer_set_grm(VoskRecognizer *recognizer, char const *grammar)
((Recognizer *)recognizer)->SetGrm(grammar);
}
void vosk_recognizer_set_ep_mode(VoskRecognizer *recognizer, VoskEpMode mode)
void vosk_recognizer_set_endpointer_mode(VoskRecognizer *recognizer, VoskEndpointerMode mode)
{
if (recognizer == nullptr) {
return;
}
((Recognizer *)recognizer)->SetEpMode(mode);
((Recognizer *)recognizer)->SetEndpointerMode(mode);
}
void vosk_recognizer_set_endpointer_delays(VoskRecognizer *recognizer, float t_start_max, float t_end, float t_max)
{
if (recognizer == nullptr) {
return;
}
((Recognizer *)recognizer)->SetEndpointerDelays(t_start_max, t_end, t_max);
}
int vosk_recognizer_accept_waveform(VoskRecognizer *recognizer, const char *data, int length)
@@ -296,3 +305,28 @@ int vosk_batch_recognizer_get_pending_chunks(VoskBatchRecognizer *recognizer)
return 0;
#endif
}
VoskTextProcessor *vosk_text_processor_new(const char *tagger, const char *verbalizer)
{
try {
return (VoskTextProcessor *)new Processor(tagger, verbalizer);
} catch (...) {
return nullptr;
}
}
void vosk_text_processor_free(VoskTextProcessor *processor)
{
delete ((Processor *)processor);
}
char *vosk_text_processor_itn(VoskTextProcessor *processor, const char *input)
{
Processor *wprocessor = (Processor *)processor;
std::string sinput(input);
std::string tagged_text = wprocessor->Tag(sinput);
std::string normalized_text = wprocessor->Verbalize(tagged_text);
return strdup(normalized_text.c_str());
}
+23 -2
View File
@@ -39,6 +39,8 @@ typedef struct VoskSpkModel VoskSpkModel;
* speaker information and so on */
typedef struct VoskRecognizer VoskRecognizer;
/** Inverse text normalization */
typedef struct VoskTextProcessor VoskTextProcessor;
/**
* Batch model object
@@ -221,14 +223,24 @@ typedef enum VoskEpMode {
VOSK_EP_ANSWER_DEFAULT = 0,
VOSK_EP_ANSWER_SHORT = 1,
VOSK_EP_ANSWER_LONG = 2,
} VoskEpMode;
VOSK_EP_ANSWER_VERY_LONG = 3,
} VoskEndpointerMode;
/**
* Set endpointer scaling factor
*
* @param mode - Endpointer mode
**/
void vosk_recognizer_set_ep_mode(VoskRecognizer *recognizer, VoskEpMode mode);
void vosk_recognizer_set_endpointer_mode(VoskRecognizer *recognizer, VoskEndpointerMode mode);
/**
* Set endpointer delays
*
* @param t_start_max timeout for stopping recognition in case of initial silence (usually around 5.0)
* @param t_end timeout for stopping recognition in milliseconds after we recognized something (usually around 0.5 - 1.0)
* @param t_max timeout for forcing utterance end in milliseconds (usually around 20-30)
**/
void vosk_recognizer_set_endpointer_delays(VoskRecognizer *recognizer, float t_start_max, float t_end, float t_max);
/** Accept voice data
*
@@ -366,6 +378,15 @@ void vosk_batch_recognizer_pop(VoskBatchRecognizer *recognizer);
/** Get amount of pending chunks for more intelligent waiting */
int vosk_batch_recognizer_get_pending_chunks(VoskBatchRecognizer *recognizer);
/** Create text processor */
VoskTextProcessor *vosk_text_processor_new(const char *tagger, const char *verbalizer);
/** Release text processor */
void vosk_text_processor_free(VoskTextProcessor *processor);
/** Convert string */
char *vosk_text_processor_itn(VoskTextProcessor *processor, const char *input);
#ifdef __cplusplus
}
#endif
+1 -1
View File
@@ -45,5 +45,5 @@ RUN cd /opt \
&& sed -i "s:TARGET_ARCH=\"\`uname -m\`\":TARGET_ARCH=$(echo $CROSS_TRIPLE|cut -d - -f 1):g" configure \
&& sed -i "s: -O1 : -O3 :g" makefiles/linux_openblas_arm.mk \
&& ./configure --mathlib=OPENBLAS_CLAPACK --shared --use-cuda=no \
&& make -j 10 online2 lm rnnlm \
&& make -j 10 online2 rnnlm \
&& find /opt/kaldi -name "*.o" -exec rm {} \;
+1 -1
View File
@@ -35,5 +35,5 @@ RUN cd /opt \
&& sed -i "s:TARGET_ARCH=\"\`uname -m\`\":TARGET_ARCH=$(echo $CROSS_TRIPLE|cut -d - -f 1):g" configure \
&& sed -i "s: -O1 : -O3 :g" makefiles/linux_openblas_arm.mk \
&& ./configure --mathlib=OPENBLAS_CLAPACK --shared --use-cuda=no \
&& make -j 10 online2 lm rnnlm \
&& make -j 10 online2 rnnlm \
&& find /opt/kaldi -name "*.o" -exec rm {} \;
+1 -1
View File
@@ -30,5 +30,5 @@ RUN cd /opt \
&& ./configure --mathlib=OPENBLAS_CLAPACK --shared --use-cuda=no \
&& sed -i 's:-msse -msse2:-msse -msse2:g' kaldi.mk \
&& sed -i 's: -O1 : -O3 :g' kaldi.mk \
&& make -j $(nproc) online2 lm rnnlm \
&& make -j $(nproc) online2 rnnlm \
&& find /opt/kaldi -name "*.o" -exec rm {} \;
+1 -1
View File
@@ -27,5 +27,5 @@ RUN cd /opt \
&& ./configure --mathlib=MKL --shared --use-cuda=no \
&& sed -i 's:-msse -msse2:-msse -msse2 -mavx -mavx2:g' kaldi.mk \
&& sed -i 's: -O1 : -O3 :g' kaldi.mk \
&& make -j $(nproc) online2 lm rnnlm \
&& make -j $(nproc) online2 rnnlm \
&& find /opt/kaldi -name "*.o" -exec rm {} \;
+1 -1
View File
@@ -62,4 +62,4 @@ RUN cd /opt/kaldi \
--host=x86_64-w64-mingw32 --openblas-clapack-root=/opt/kaldi/local \
--fst-root=/opt/kaldi/local --fst-version=1.8.0 \
&& make depend -j \
&& make -j $(nproc) online2 lm rnnlm
&& make -j $(nproc) online2 rnnlm
+1 -1
View File
@@ -61,4 +61,4 @@ RUN cd /opt/kaldi \
--host=i686-w64-mingw32 --openblas-clapack-root=/opt/kaldi/local \
--fst-root=/opt/kaldi/local --fst-version=1.8.0 \
&& make depend -j \
&& make -j $(nproc) online2 lm rnnlm
&& make -j $(nproc) online2 rnnlm
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "vosk-js",
"version": "0.3.45",
"version": "0.3.50",
"description": "Node binding for continuous voice recoginition through vosk-api.",
"repository": {
"type": "git",