Skip to content

Commit

Permalink
v.1.2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
solyarisoftware committed Jun 28, 2021
1 parent 4269da6 commit d405364
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 5 deletions.
5 changes: 3 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# Change log

- 1.2.1
- 1.2.2
- voskjs.js: added `transcriptEventsFromFile` to manage streaming transcript with events. Just a draft
Now voskjs print partial results, end of speech results and final result.
- Now voskjs prints partial results, end of speech results and final result.
- new audio file for test: audio/sentencesWithSilences.wav

- 1.1.5
- docs update
Expand Down
Binary file added audio/sentencesWithSilences.wav
Binary file not shown.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@solyarisoftware/voskjs",
"version": "1.2.1",
"version": "1.2.2",
"description": "NodeJs developers API for Vosk-api speech-to-text engine.",
"main": "index.js",
"repository": {
Expand Down
21 changes: 21 additions & 0 deletions tests/simplerec.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash

if [ $# -eq 0 ]
then
echo "usage : $0 filename (without suffix)"
echo "example: $0 sample"
exit 0
else
audiofile=$1.wav
fi

echo "recording file $audiofile (press Ctrl+C to stop recording)"

# recording with sox
sox -d -b 16 -c 1 -r 16k $audiofile

# info about the recorded file
mediainfo $audiofile

# play the recorded file
aplay $audiofile
2 changes: 0 additions & 2 deletions voskjs.js
Original file line number Diff line number Diff line change
Expand Up @@ -320,9 +320,7 @@ function transcriptEventsFromFile(fileName, model, { multiThreads=true, sampleRa
//
if (end_of_speech)
event.emit('endOfSpeechResult', recognizer.result())
//console.log('endOfSpeech', recognizer.result())
else
//console.log('partialResult', recognizer.partialResult())
event.emit('partialResult', recognizer.partialResult())

}
Expand Down

0 comments on commit d405364

Please sign in to comment.