Skip to content

Commit e01a1c3

Browse files
refactor(models, ffi): Improve PretrainedModel structure, generation logic, and FFI usage
- Reorganized methods within `PretrainedModel` for better readability and logical flow - Fixed usage logic for various LogitsProcessors including `NoBadWordsLogitsProcessor`, `MinNewTokensLengthLogitsProcessor`, `ForcedBOSTokenLogitsProcessor`, and `SuppressTokensAtBeginLogitsProcessor`. - Removed usage of `ForceTokensLogitsProcessor`. - Refactored `Samplerate` and `Sndfile` FFI wrappers from static methods to an instance-based approach.
1 parent a7dbad6 commit e01a1c3

28 files changed

+2152
-1874
lines changed

THIRD_PARTY_NOTICES.md

Lines changed: 0 additions & 52 deletions
This file was deleted.

composer.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@
1717
"ext-ffi": "*",
1818
"codewithkyrian/jinja-php": "^1.0",
1919
"imagine/imagine": "^1.3",
20-
"rindow/rindow-math-matrix": "^2.0",
21-
"rindow/rindow-matlib-ffi": "^1.0",
20+
"rindow/rindow-math-matrix": "^2.1",
21+
"rindow/rindow-matlib-ffi": "^1.1",
2222
"rindow/rindow-openblas-ffi": "^1.0",
23-
"rokka/imagine-vips": "^0.31.0",
23+
"rokka/imagine-vips": "^0.40",
2424
"symfony/console": "^6.4|^7.0",
2525
"codewithkyrian/platform-package-installer": "^1.0"
2626
},
@@ -30,8 +30,7 @@
3030
},
3131
"suggest": {
3232
"ext-imagick": "Required to use the Imagick Driver for image processing",
33-
"ext-gd": "Required to use the GD Driver for image processing",
34-
"rokka/imagine-vips": "Required to use the VIPS Driver for image processing"
33+
"ext-gd": "Required to use the GD Driver for image processing"
3534
},
3635
"license": "Apache-2.0",
3736
"autoload": {
@@ -50,6 +49,7 @@
5049
}
5150
],
5251
"config": {
52+
"sort-packages": true,
5353
"allow-plugins": {
5454
"pestphp/pest-plugin": true,
5555
"codewithkyrian/platform-package-installer": true

examples/nextTokenScores.json

Whitespace-only changes.

examples/pipelines/asr.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,8 @@
2525
//$audioUrl = __DIR__ . '/../sounds/ted_60.wav';
2626
//$audioUrl = __DIR__ . '/../sounds/sample-1.mp3';
2727

28-
$streamer = WhisperTextStreamer::make();
29-
//->onTimestampStart(fn($timestamp) => dump($timestamp));
30-
//->onStream(fn($text) => print($text));
28+
$streamer = WhisperTextStreamer::make()
29+
->onStream(fn($text) => print($text));
3130

3231
$output = $transcriber($audioUrl,
3332
maxNewTokens: 256,

0 commit comments

Comments
 (0)