533 Commits

Author SHA1 Message Date
Tom Boccuto e61c01d496 Use unordered_set for nonsilence lookup in GetSpkVector (#2035)
Replaces O(n^2) std::find scan with O(1)-avg hash-set lookup,
addressing the existing "would be nice to have faster search"
comment. Total cost drops from O(num_frames * |nonsilence|) to
O(num_frames + |nonsilence|).
2026-07-02 23:03:34 +03:00
Kevin Brown 3bc886a6c4 Add SpeechService constructor accepting a caller-supplied AudioRecord (#2044)
Allows callers to control the audio input device - for example, to pin
recording to the built-in microphone when an external USB camera without
a microphone causes Android to silently select the wrong input source.

The new overload (Recognizer, float, AudioRecord) mirrors the existing
(Recognizer, float) signature. Ownership semantics differ: the caller
supplies and owns the recorder, so on failure this constructor throws
without releasing it, leaving cleanup to the caller.

Co-authored-by: Kevin Brown <git@whidit.com>
2026-06-04 20:54:55 +03:00
Kevin Brown e81a422289 Add getAudioSessionId() getter to SpeechService (#2042)
Expose the AudioRecord session ID so callers can attach Android audio
effects (e.g. NoiseSuppressor, AcousticEchoCanceler) to the recording
session without subclassing or reflection.

Co-authored-by: Kevin Brown <git@whidit.com>
2026-05-29 08:50:13 +03:00
Vladimir Ulianitsky 9adbd76c77 Add Ruby gem (#2022)
* Init gem

* WIP

* WIP

* WIP: Gemify

* WIP

* Try ffi_gen

* Revert "Try ffi_gen"

This reverts commit a54e56b35a1bdc079dbe122aff47d79038d4e52f.

* Vibecode 1

* Vibecode 2

* rework progressbar

* Some ref + test_captcha

* Return deleted by Claude

* Draft precompiled packaging

* Review and refactor C bindings

* ref OwnedString

* Rename methods and add notes

* rubocop

* Fix progressbar, add examples

* Ref spec

* Ref spec - final

* Final ver

* Add srt, other fixes

* Move to ruby dir

---------

Co-authored-by: Nickolay V. Shmyrev <nshmyrev@gmail.com>
2026-02-22 11:51:10 +03:00
Nickolay Shmyrev 625e44c626 Bump JNA requirements to 5.18.1 and update version 2025-12-08 21:47:46 +01:00
Nickolay Shmyrev 488fc44d71 Add missing file to git, fixes #2001 2025-10-24 13:10:51 +02:00
Adam Jaso a428d65966 Add Golang GPU Batch API and example (#1983)
Co-authored-by: ajaso <github@ajaso.net>
2025-09-10 16:13:51 +03:00
Nickolay Shmyrev 056a2ad548 Updates for recent android 2025-09-03 09:46:07 +02:00
Nickolay Shmyrev 07a0ddb467 Add endpointer mode to java and csharp API 2025-09-03 07:14:40 +02:00
resignedScientist 24f0e0cff8 add 16 KB page size support (#1976)
Co-authored-by: Norman Laudien <kontakt@norman-laudien.de>
2025-08-25 02:08:01 +03:00
Utkarsh Gual 0f364e3a44 Fix typo in encoding in transcribe_scp.py (#1955)
Fix typo in encoding in transcribe_scp.py. uft-8 -> utf-8
2025-07-11 23:02:00 +03:00
Nickolay Shmyrev eabd80a848 Support MUSL variant in packging 2025-05-01 11:20:40 +02:00
Nickolay Shmyrev 780ba2f0b7 Add MUSL build 2025-05-01 11:06:56 +02:00
Nickolay Shmyrev 47509f7f9c Properly rebuilt fst 2025-05-01 09:05:17 +02:00
Md Husain Thekiya 4bf3370826 Fix: Raise exception in Node.js binding when model creation fails (#716) (#1714) 2025-03-05 19:16:56 +03:00
Matt Kenefick cf67ed6cd9 Support ARM 64 in NodeJS (#1655)
Identify and support ARM64 in the NodeJS vosk-api
2024-11-14 00:23:16 +03:00
Nickolay Shmyrev 0979c46766 Add speaker vector to n-best results. Fixes issue #1647 2024-10-24 15:34:05 +02:00
Nickolay V. Shmyrev eeab22ed98 Added postprocessor. Fixes #1641 2024-10-11 00:05:08 +03:00
Paschalis M a9f27eb11d Update README.md with training details (#1637) 2024-09-26 16:29:42 +03:00
Nickolay Shmyrev 1b308a3017 Added Win ARM64 build 2024-08-23 21:36:40 +02:00
Nickolay Shmyrev f5540085b5 Add text processor wrapper for java 2024-08-22 03:13:44 +02:00
Clocks c64c3daa3b Kotlin updates (#1596)
* Add TextProcessor.kt

* Add Recognizer end pointer functions

* Properly close input stream

Mirror of 5d09ee8

* Bump android compile sdk to 34

* Update everything

All dependencies, etc
2024-06-19 22:22:50 +03:00
Nickolay Shmyrev cc48ff9567 Properly count active states 2024-06-17 07:24:51 +02:00
johngebbie 7358c799b1 go: Add SetEndpointerDelays (#1570) 2024-05-06 08:33:26 +03:00
Nickolay Shmyrev a7bf6a51e2 Bump version go/v0.3.50 v0.3.50 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 go/v0.3.46 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
Nickolay Shmyrev c3e3fc002f Add online endpointer reconfiguration 2023-10-16 13:40:32 +02:00
Nickolay Shmyrev 62fc308bdf Sometimes python interpreter destroys the handle on exit before
the object. See

https://foss.heptapod.net/pypy/cffi/-/issues/340
2023-09-04 00:33:42 +02:00
Dmitri Soloviev 60c0e33901 simplify go example (#1430) 2023-08-12 23:04:46 +03:00
jsbxyyx 5d09ee8b2b close source input stream (#1) (#1428) 2023-08-11 00:55:33 +03:00
JohnGebbie 12f29a3415 go: Add SetGrm (#1346) 2023-04-29 05:35:01 +03:00
Nickolay Shmyrev d56221bcf2 Add mkl docker build 2023-04-06 02:38:06 +02:00
Nickolay Shmyrev a2eb39d2d7 Set number of MKL threads 2023-04-06 02:10:53 +02:00
Anton Romanov 128c216c61 Fix vosk-transcriber cli json format (#1304)
Fix error UnboundLocalError: local variable 'monologue' referenced before assignment in transcriber.py line 102
2023-03-29 03:12:16 +03:00
mason-acronode da87d0dad3 c# supports GPU inference (#1307)
* Added Batch P/Invoke to be able to use GPU based inference

* Modified Result method

* Modified Result method

* Fixed code to call BatchModel

---------

Co-authored-by: minsik.sim <minsik.sim@cyara.com>
2023-03-25 12:28:14 +03:00
Nickolay Shmyrev 9cee2899bb Update publishing plugin and simplify gradle build 2023-03-15 22:50:42 +01:00
Doomsdayrs a40742bbaf Kotlin: Numerous Improvements (#1274)
* kotlin: bump version for future release

* kotlin: Unify dependency versions

* kotlin: Add AUTHORS

* kotlin: Add MAINTENANCE.md

* kotlin: Add README.md

* kotlin: Update common/Vosk.kt documentation

* kotlin: Fix indentation in build.gradle.kts

* kotlin: Add .idea files to unify how IDEs work

* kotlin: Reformat all code

* kotlin: Update all code headers

* kotlin: Add @JvmStatic to objects

* kotlin: Use Consumer instead of Kotlin lambda in StorageService.kt

* kotlin: Annotate SpeechService.kt as throwing IOException

* kotlin: Add gradle migration settings

* kotlin: Add Deprecated annotation to jvm/LibVosk.setLogLevel

* kotlin: Overhaul exceptions

* Update documentation

* Add function for creating a Recognizer with a proper list

* Update documentation
2023-03-03 19:12:54 +03:00
Doomsdayrs d714dff8d3 Add Kotlin Multiplatform (#1241)
* Init

* Implement common

* Implement JVM target

* Ignore build/ directory

* Implement android

* Disable kotlin/native targets

* Remove jCenter()

* Upgrade android tools to 7.3.0

* Enforce not null for essential windows operations

* Add license headers

* Add maven-publish

* Add dokka for javadoc

* Add disabled kotlin/native for linux

This is disabled currently due to vosk
 not having a proper installation method on linux yet.

* Add empty constructors for JVM classes

* Fix library initialization for JVM

* Add DecoderDemo

* Add serialization support

* Convert no arg functions with returns to val properties

* Properly implement DecoderTest

* Import other android classes

* Properly name json parser as voskJson

* Add license headers to native target

* Unify free functions with Freeable interface

This makes it easy for Kotlin/Native to use a "use" function to
 auto free after use of a Freeable.

* Document JVM default constructor

* Add JVM specific constructors with NIO/IO

* Inline default constructors in Common

* Properly handle invalid paths

* Add android publishing block

* Merge serialization into common

* Update to Kotlin 1.8.10

* Update to JNA 5.13.0

* Put native target behind environment variable or override.

Due to a lack of official packaging,
 this is not possible currently.

* Properly handle Recognizer.acceptWaveform exceptions

* Add flow extension for converting (InputStream->Recognizer) to a flow.

* Use ByteFlow for waveform flow instead.

This allows custom readers, and more advanced backends,
 such as the Dicio example in DecoderTest.kt .
2023-02-17 03:47:20 +03:00