Commit Graph

235 Commits

Author SHA1 Message Date
Kitaiti Makoto 63d3136465 Define Parakeet::Segment attributes 2026-06-17 10:30:56 +09:00
Kitaiti Makoto bb096e54ac Add Parakeet::Context#each_segment 2026-06-17 10:30:56 +09:00
Kitaiti Makoto 6bcc09b911 Add Parakeet::Context#transcribe 2026-06-17 10:30:56 +09:00
Kitaiti Makoto 6d2291dc8a Prevent double-free 2026-06-17 10:30:56 +09:00
Kitaiti Makoto 2cfefa926b Add Parakeet::Segment 2026-06-17 10:30:56 +09:00
Kitaiti Makoto 46a3a2cb93 Add TestParakeetContext 2026-06-17 10:30:56 +09:00
Kitaiti Makoto fdaf031858 Implement Parakeet::Context#initialize 2026-06-17 10:30:56 +09:00
Kitaiti Makoto 8615ac87ec Free parakeet_full_params 2026-06-17 10:30:56 +09:00
Kitaiti Makoto 3bae1e2f1b Reduce if 2026-06-17 10:30:56 +09:00
Kitaiti Makoto f55f3f347c Check callback container in GetParakeetParams 2026-06-17 10:30:56 +09:00
Kitaiti Makoto a3515ac9fc Fix typo 2026-06-17 10:30:56 +09:00
Kitaiti Makoto d051ab6261 Add hook methods to Parakeet::Params 2026-06-17 10:30:56 +09:00
Kitaiti Makoto 105f7a86b9 Define Parakeet 2026-06-17 10:30:56 +09:00
Kitaiti Makoto c5894984b3 Simplify params registration 2026-06-17 10:30:56 +09:00
Kitaiti Makoto 17bd819585 Remove unnecessary macros 2026-06-17 10:30:56 +09:00
Kitaiti Makoto 1e7c734a1d Fix memsize 2026-06-17 10:30:56 +09:00
Kitaiti Makoto 09eff4d1ba Use ITERATE_CALLBACK_PARAMS instead of ITERATE_USER_DATA_PARAMS 2026-06-17 10:30:56 +09:00
Kitaiti Makoto d051c08841 Use ITERATE_CALLBACK_PARAMS 2026-06-17 10:30:56 +09:00
Kitaiti Makoto cd0e91175a Remove unused variable 2026-06-17 10:30:56 +09:00
Kitaiti Makoto b1dbf7452d Define GetParakeetParams 2026-06-17 10:30:56 +09:00
Kitaiti Makoto f412e289ea Undefine local macros 2026-06-17 10:30:56 +09:00
Kitaiti Makoto f39b100bb0 Group callback and user_data params 2026-06-17 10:30:56 +09:00
Kitaiti Makoto 555569481c Add callbacks to Parakeet::Params 2026-06-17 10:30:56 +09:00
Kitaiti Makoto 703fe18e60 Remove unused variabel 2026-06-17 10:30:56 +09:00
Kitaiti Makoto 30abb35db8 Add tests for Parakeet::Params 2026-06-17 10:30:56 +09:00
Kitaiti Makoto f3b2ed68e5 Add Whisper::Parakeet::Params 2026-06-17 10:30:56 +09:00
Daniel Bevenius 9efddafb91
parakeet : add support for NVIDIA Parakeet (#3735)
* parakeet : add support for NVIDIA Parakeet


Co-authored-by: Georgi Gerganov <ggerganov@gmail.com>
2026-06-16 20:44:10 +02:00
Daniel Bevenius 48f628a848
release : v1.8.7 (#3881) 2026-06-16 12:28:23 +02:00
Georgi Gerganov 23ee03506a
release : v1.8.6 2026-06-01 14:56:20 +03:00
Georgi Gerganov e0fd1f6787
release : v1.8.5 2026-05-25 13:06:33 +03:00
OrbisAI Security b3877e10c0
fix: in bindings/ruby/test/jfk_reader/jfk_reader in jfk_reader.c (#3756)
* fix: V-002 security vulnerability

Automated security fix generated by Orbis Security AI

* fix(ruby): use Ruby allocator macros in jfk_reader and fix memory leak

- Replace calloc/free with ALLOC_N/xfree to match Ruby binding conventions
  (ALLOC_N handles overflow checking and raises NoMemoryError on failure)
- Free temporary samples buffer after conversion loop (was leaked)
- Add NULL check for fopen return value with rb_raise
- Add comment clarifying n_samples is a compile-time constant

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(ruby): return false instead of rb_raise in memory_view callback

rb_memory_view_get_func_t callbacks should communicate errors via
return value (false), not exceptions. rb_memory_view_get has no
exception-handling wrapper around get_func calls.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* replacing ALLOC_N with rb_protect as ALLOC_N raises Ruby exceptions

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-25 08:19:23 +02:00
annaeina f08258abd7
whisper : fix max_tokens skipping remaining audio (#3798)
* whisper: fix max_tokens skipping remaining audio

* add PR reference comment as suggested

Co-authored-by: Georgi Gerganov <ggerganov@gmail.com>

* fix(ci): enable artifact overwrite
2026-05-13 07:32:00 +02:00
KITAITI Makoto c81b2dabbc
ruby : transcribe without GVL, accept more MemoryViews, Windows support, fix memory size report, improve document (#3775)
* Change MemoryView example using NDAV

* Add note on audio attributes for #full and #full_parallel

* Support more variants of MemoryView

* Use IO.popen instead of Kernel.` for Windows compatibility

* Use cmake's -C option instead of multiple -D options

* Fix memsize calculation

* Remove unused argument

* Add is_interrupted field to abort callback container

* Fix RBS syntax

* Address document comment for RDoc

* Add .document for RDoc

* Add .rdoc_options

* Run #full without GVL

* Initialize callbacks with nil

* Specify implicity Whisper::Params to distinguish from Whisper::Context::Params

* Run callbacks without GVL

* Call log callback with GVL

* Run full_parallel without GVL

* Run transcribe without GVL

* Fix ruby_whisper_lock_gvl and ruby_whisper_unlock_gvl

* Fix return value of encoder_begin_callback

* Report GVL unlocking from transcribe

* Remove unused interface

* Restore overload of full_parallel

* Close process

* Fix struct name

* Make is_without_gvl thread local

* Use rb_thread_call_with_gvl instead of global variable

* Retrieve instance variable in GVL

* Narrow acceptable MemoryView format

* Fix option cache path

* Reduce files in package

* Use append_cflags

* Add ext/*.rb to task dependencies

* Use copy instead of cp

* Make TestPackage more portable

* Patch for lower version Ruby

* Make build scripts more portable

* Add Windows support

* Don't raise exceptions
2026-05-07 06:28:18 +02:00
KITAITI Makoto 76684141a5
ruby : fix dangling pointers, memory leak, and SEGV on parallel transcription (#3715)
* Prevent dangling pointers

* Use proper free function

* Free callback containers

* Set default log callback when nil is passed to log_set

* Raise error if callbacks set when parallel transcription

* Bump version to 1.3.7

* Make tests follow spec change

* Add note on parallel transcription and callbacks

* Update signature of Whisper.log_set [skip ci]
2026-03-22 02:03:00 +09:00
Georgi Gerganov 9386f23940
release : v1.8.4 2026-03-19 10:40:13 +02:00
Alan 79218f51d0
go : handle EOF correctly in model download (#3671) 2026-03-16 13:44:18 +02:00
KITAITI Makoto 30c5194c96
ruby : null-check (#3689)
* Introduce null-check to prevent SEGV

* Fix error message
2026-03-05 14:36:42 +09:00
KITAITI Makoto 941bdabbe4
ruby : add `Whisper::Context::Params`, fix token memory management (#3647)
* Don't convert to temporary VALUE

* Define Whisper::Context::Params

* Add test for Whisper::Context::Params

* Implement Whisper::Context::Params

* Add tests for Context::Params

* Fix Whisper::Token memory management

* Add test for token_timestamps

* Make Context accept Context::Params

* Make Context::Params.new accept keyword args

* Add test for Context::Params.new with keyword args

* Add signature of Context::Params

* Add example for Whisper::Token

* Fix typos

* Revert "Don't convert to temporary VALUE"

This reverts commit dee66e7384.

* Hold Token#text as Ruby objectd

* Don't use pointer for ruby_whisper_context_params.params

* Use RUBY_DEFAULT_FREE instead of custom function

* Update bindings/ruby/README.md

Co-authored-by: Daniel Bevenius <daniel.bevenius@gmail.com>

* Add document for Whisper::Context::Params

---------

Co-authored-by: Daniel Bevenius <daniel.bevenius@gmail.com>
2026-02-04 20:33:09 +09:00
KITAITI Makoto aa1bc0d1a6
ruby : add `VAD::Context#segments_from_samples`, allow Pathname, etc. (#3633)
* ruby : Bump version to 1.3.6

* Fix code in example

* Add sample code to transcribe from MemoryView

* Define GetVADContext macro

* Use GetVADContext

* Extract parse_full_args function

* Use parse_full_args in ruby_whisper_full_parallel

* Free samples after use

* Check return value of parse_full_args()

* Define GetVADParams macro

* Add VAD::Context#segments_from_samples

* Add tests for VAD::Context#segments_from_samples

* Add signature for VAD::Context#segments_from_samples

* Add sample code for VAD::Context#segments_from_samples

* Add test for Whisper::Context#transcribe with Pathname

* Make Whisper::Context#transcribe and Whisper::VAD::Context#detect accept Pathname

* Update signature of Whisper::Context#transcribe

* Fix variable name

* Don't free memory view

* Make parse_full_args return struct

* Fallback when failed to get MemoryView

* Add num of samples when too long

* Check members of MemoryView

* Fix a typo

* Remove unnecessary include

* Fix a typo

* Fix a typo

* Care the case of MemoryView doesn't fit spec

* Add TODO comment

* Add optimazation option to compiler flags

* Use ALLOC_N instead of malloc

* Add description to sample code

* Rename and change args: parse_full_args -> parse_samples

* Free samples when exception raised

* Assign type check result to a variable

* Define wrapper function of whisper_full

* Change signature of parse_samples for rb_ensure

* Ensure release MemoryView

* Extract fill_samples function

* Free samples memory when filling it failed

* Free samples memory when transcription failed

* Prepare transcription in wrapper funciton

* Change function name

* Simplify function boundary
2026-01-30 22:59:36 +09:00
Georgi Gerganov 2eeeba56e9
release : v1.8.3 2026-01-15 11:54:31 +02:00
KITAITI Makoto 679bdb53db
ruby : fix segmentation fault (#3591)
* Mark long live variable

* Fix test for Whisper::Token#deconstruct_keys(nil)

* Don't use long live variable

* Fix indentation
2026-01-05 17:41:22 +09:00
KITAITI Makoto 6114e69213
ruby : add Whisper::Token, fix model URI (#3575)
* Define and use macro to get context safely

* Add test to check SEGV

* Move installation guid after usage

* [skip ci]Change doc slightly

* [skip ci]Fix a typo in README

* [skip ci]Add carry_initial_prompt option in README

* Define GetVADSegments and use it

* Use GetContext

* Fix download URI of small.en-tdrz

* Fix URI of CoreML models corresponding to quantized models

* Cache computed string

* Remove unused argument

* Add Whisper::Token

* Add document comments

* Rename function: rb_whisper_token_s_new -> ruby_whisper_token_s_init

* Fix size of token

* Insert _get into function names

* Add Whisper::Token#text

* Add test for Whisper::Token#text

* Declare static if possible

* Change method names

* Add Whisper::Token#deconstruct_keys

* Add tests for Whisper::Token#deconstruct_keys

* Add signatures for Whisper::Token

* Complete signature

* [skip ci]Add n_tokens to document of Segment
2025-12-24 16:52:16 +09:00
Josh Montoya 9f5ed26e43
go : Enable VAD for Go bindings (#3563)
* reset context.n so that NextSegment can be called for multiple Process calls

* enable VAD params
2025-12-10 13:31:36 +02:00
Josh Montoya a8f45ab11d
go : reset context.n in Process() (#3503) 2025-12-08 18:33:07 +02:00
KITAITI Makoto 27f485a14c
vad : Silero VAD v6.2.0 (#3524)
* Add ggml-silero-v6.2.0 to download candidates

* Make default VAD model ggml-silero-v6.2.0

* Make VAD model in documentations ggml-silero-v6.2.0
2025-11-17 22:26:17 +09:00
KITAITI Makoto d9b7613b34
ruby : VAD separately from ASR (#3518)
* Add Whisper::VAD::Context

* Add test for Whisper::VAD::Context

* Add Whisper::VAD::Segment

* Add Whisper::VAD::Segments

* Add Whisper::VAD::Context#detect

* Define Whisper::VAD::Segments#each

* Define Whisper::VAD::Segment#start_time and #end_time

* Define Whisper::VAD::Segment#deconstruct_keys

* Add tests for Whisper::VAD family

* Add signatures for VAD family

* Add document on VAD in README

* Define Whisper::VAD::Segments#length

* Add test for Whisper::VAD::Segments#length

* Add signature of Segments#length

* Make vad_segments responsible to initialize VAD::Segments

* Remove meaningless argument check

* Check NULL of segments member

* Add tests for Whisper::VAD::Segments

* Initialize Whisper::VAD::Segment on .allocate

* Add tests for Whisper::VAD::Segment

* Check NULL of context member

* Add test for Whisper::VAD::Context.allocate
2025-11-13 10:15:26 +09:00
KITAITI Makoto c62adfbd1e
ruby : tiny bug fix (#3490)
* Remove build-xcframework.sh from package

* Remove unused variable

* Bump version to 1.3.5

* Don't use variable before declaration
2025-10-29 03:50:44 +09:00
Georgi Gerganov 4979e04f5d
release : v1.8.2 2025-10-15 10:29:42 +03:00
Georgi Gerganov a91dd3be72
release : v1.8.1 2025-10-12 11:17:59 +03:00
Andreas Lubbe 85871a9469
whisper : add support for --carry-initial-prompt (#3395)
* Add support for --carry-initial-prompt

* PR fixes for ruby and go

* Refactoring for readability

* WIP 1

* WIP 2

* PR fixes

* More PR fixes

* PR fix

* Further simplification

* d'oh

* One more logic fix

* Update src/whisper.cpp

Co-authored-by: Georgi Gerganov <ggerganov@gmail.com>

* Truncate prompt_past0 upon initialization

* Slight simplification

---------

Co-authored-by: Georgi Gerganov <ggerganov@gmail.com>
2025-10-10 19:51:15 +03:00