Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
gst-kaldi-nnet2-online
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
homeostasis
gst-kaldi-nnet2-online
Commits
44a231eb
Commit
44a231eb
authored
10 years ago
by
tanel
Browse files
Options
Downloads
Patches
Plain Diff
cosmetic changes
parent
749030cb
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
README
+5
-3
5 additions, 3 deletions
README
demo/dr_strangelove.mp3
+0
-0
0 additions, 0 deletions
demo/dr_strangelove.mp3
demo/prepare-models.sh
+16
-0
16 additions, 0 deletions
demo/prepare-models.sh
demo/transcribe-audio.sh
+31
-0
31 additions, 0 deletions
demo/transcribe-audio.sh
with
52 additions
and
3 deletions
README
+
5
−
3
View file @
44a231eb
...
@@ -30,13 +30,15 @@ KALDI_ROOT=/path/of/kaldi-trunk make
...
@@ -30,13 +30,15 @@ KALDI_ROOT=/path/of/kaldi-trunk make
This should result in 'libgstkaldionline2.so'.
This should result in 'libgstkaldionline2.so'.
Test i
d
GStreamer can access the plugin:
Test i
f
GStreamer can access the plugin:
GST_PLUGIN_PATH=. gst-inspect-1.0 kaldinnet2onlinedecoder
GST_PLUGIN_PATH=. gst-inspect-1.0 kaldinnet2onlinedecoder
HOW TO USE IT
HOW TO USE IT
-------------
-------------
TODO
Command-line usage is demonstrated in `demo/`.
Usage through GSTreamer's Python bindings is demonstrated in
https://github.com/alumae/kaldi-gstreamer-server (kaldigstserver/decoder2.py).
This diff is collapsed.
Click to expand it.
demo/dr_strangelove.mp3
0 → 100644
+
0
−
0
View file @
44a231eb
File added
This diff is collapsed.
Click to expand it.
demo/prepare-models.sh
0 → 100755
+
16
−
0
View file @
44a231eb
#! /bin/bash
BASE_URL
=
http://kaldi-asr.org/downloads/build/2/sandbox/online/egs/fisher_english/s5
MODEL
=
exp/nnet2_online/nnet_a_gpu_online
GRAPH
=
exp/tri5a
wget
-N
$BASE_URL
/
$MODEL
/final.mdl
||
exit
1
(
mkdir
-p
ivector_extractor
;
cd
ivector_extractor
;
wget
-N
$BASE_URL
/
$MODEL
/ivector_extractor/
{
final.ie,final.dubm,final.mat,global_cmvn.stats
})
||
exit
1
(
mkdir
-p
conf
;
cd
conf
;
wget
-N
$BASE_URL
/
$MODEL
/conf/
{
ivector_extractor.conf,online_nnet2_decoding.conf,mfcc.conf,online_cmvn.conf,splice.conf
})
||
exit
1
wget
-N
$BASE_URL
/
$GRAPH
/graph/HCLG.fst
||
exit
1
wget
-N
$BASE_URL
/
$GRAPH
/graph/words.txt
||
exit
1
cat
conf/ivector_extractor.conf | perl
-npe
's/=.*nnet_a_gpu_online\//=/'
>
conf/ivector_extractor.fixed.conf
This diff is collapsed.
Click to expand it.
demo/transcribe-audio.sh
0 → 100755
+
31
−
0
View file @
44a231eb
#!/bin/bash
if
[
$#
!=
1
]
;
then
echo
"Usage: transcribe-audio.sh <audio>"
echo
"e.g.: transcribe-audio.sh dr_strangelove.mp3"
exit
1
;
fi
!
GST_PLUGIN_PATH
=
../src gst-inspect-1.0 kaldinnet2onlinedecoder
>
/dev/null 2>&1
&&
echo
"Compile the plugin in ../src first"
&&
exit
1
;
if
[
!
-f
HCLG.fst
]
;
then
echo
"Run ./prepare-models.sh first to download models"
exit
1
;
fi
audio
=
$1
GST_PLUGIN_PATH
=
../src gst-launch-1.0
--gst-debug
=
""
-q
filesrc
location
=
$audio
!
decodebin
!
audioconvert
!
audioresample
!
\
kaldinnet2onlinedecoder
\
model
=
final.mdl
\
fst
=
HCLG.fst
\
word-syms
=
words.txt
\
feature-type
=
mfcc
\
mfcc-config
=
conf/mfcc.conf
\
ivector-extraction-config
=
conf/ivector_extractor.fixed.conf
\
max-active
=
7000
\
beam
=
11.0
\
lattice-beam
=
5.0
\
do
-endpointing
=
true
\
endpoint-silence-phones
=
"1:2:3:4:5:6:7:8:9:10"
\
!
filesink
location
=
/dev/stdout buffer-mode
=
2
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment