Skip to content

Commit

Permalink
updated project;
Browse files Browse the repository at this point in the history
  • Loading branch information
Igor Sitdikov committed Apr 3, 2021
1 parent c3da931 commit 363c21a
Show file tree
Hide file tree
Showing 39 changed files with 458 additions and 490 deletions.
8 changes: 6 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,14 @@
vosk_wrap.cc
*.so
*.o
resources
*_wrap.cc
*.a
target
*.class
*.dll
*.lib
*.lib
build
.gradle
env
*.tar.xz
*.whl
2 changes: 2 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ repositories {
}

dependencies {
compile group: 'net.java.dev.jna', name: 'jna', version: '5.7.0'

// https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-databind
compile group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.0.1'

Expand Down
Binary file removed lid-107/final.ext.raw
Binary file not shown.
1 change: 0 additions & 1 deletion lid-107/mean.vec

This file was deleted.

7 changes: 0 additions & 7 deletions lid-107/mfcc.conf

This file was deleted.

Binary file removed lid-107/num_utts.ark
Binary file not shown.
Binary file removed lid-107/plda_adapt.smooth0.1
Binary file not shown.
Binary file removed lid-107/transform.mat
Binary file not shown.
4 changes: 0 additions & 4 deletions lid-107/vad.conf

This file was deleted.

Binary file removed lid-107/xvector.final.train.scp
Binary file not shown.
92 changes: 0 additions & 92 deletions native/l2m.i

This file was deleted.

6 changes: 6 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@
<version>1.18.12</version>
<scope>provided</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/net.java.dev.jna/jna -->
<dependency>
<groupId>net.java.dev.jna</groupId>
<artifactId>jna</artifactId>
<version>5.8.0</version>
</dependency>
</dependencies>

<build>
Expand Down
8 changes: 6 additions & 2 deletions python/example/test_simple.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,19 @@
import sys
import os
import wave
import json

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.")
exit (1)

model = Model("lid-107")
model = Model("lid-model")
rec = KaldiRecognizer(model, wf.getframerate())
data = wf.readframes(-1)
rec.AcceptWaveform(data)
print(rec.Result())

results = rec.Result()
result = max(json.loads(results), key=lambda ev: ev['score'])
# print(json.loads(results))
print("identified language: ", result['language'])
2 changes: 1 addition & 1 deletion python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def get_tag(self):

setuptools.setup(
name="lid",
version="0.0.1",
version="1.0.1",
author="Igor Sitdikov",
author_email="ihar.sitdzikau@yandex.ru",
description="Spoken Language Identification",
Expand Down
191 changes: 0 additions & 191 deletions src/main/java/l2m/recognition/language/EmbeddedLibraryTools.java

This file was deleted.

Loading

0 comments on commit 363c21a

Please sign in to comment.