|
2 | 2 |
|
3 | 3 | All notable changes to `transformers-php` will be documented in this file. |
4 | 4 |
|
5 | | -## TransformersPHP v0.5.0 - 2024-08-21 |
6 | | - |
7 | | -I'm excited to announce the latest version of TransformersPHP, packed with new features, improvements, and bug fixes. This release brings powerful enhancements to your machine-learning-driven PHP applications, enabling more efficient and versatile operations. |
8 | | - |
9 | | -### New Features |
10 | | - |
11 | | -- **New Pipeline: Audio Classification** - Easily classify audio clips with a pre-trained model. |
12 | | - |
13 | | - ```php |
14 | | - $classifier = pipeline('audio-classification', 'Xenova/ast-finetuned-audioset-10-10-0.4593'); |
15 | | - $audioUrl = __DIR__ . '/../sounds/cat_meow.wav'; |
16 | | - $output = $classifier($audioUrl); |
17 | | - // [ |
18 | | - // [ |
19 | | - // "label" => "Meow" |
20 | | - // "score" => 0.6109990477562 |
21 | | - // ] |
22 | | - // ] |
23 | | - |
24 | | - ``` |
25 | | -- **New Pipeline: Automatic Speech Recognition (ASR)** - Supports models like `wav2vec` and `whisper` for transcribing speech to text. If a specific model is not officially supported, please open an issue with a feature request. |
26 | | - |
27 | | - - Example: |
28 | | - ```php |
29 | | - $transcriber = pipeline('asr', 'Xenova/whisper-tiny.en'); |
30 | | - $audioUrl = __DIR__ . '/../sounds/preamble.wav'; |
31 | | - $output = $transcriber($audioUrl, maxNewTokens: 256); |
32 | | - // [ |
33 | | - // "text" => "We, the people of the United States, ..." |
34 | | - // ] |
35 | | - |
36 | | - ``` |
37 | | - |
38 | | - |
39 | | -### Enhancements |
40 | | - |
41 | | -- **Shared Libraries Dependencies:** - A revamped workflow for downloading shared libraries dependencies ensures they are versioned correctly, reducing download sizes. These binaries are now thoroughly tested on Apple Silicon, Intel Macs, Linux x86_64, Linux aarch64, and Windows platforms. |
42 | | - |
43 | | -- **`Transformers::setup` Simplified** - `Transformers::setup()` is now optional. Default settings are automatically applied if not called. The` apply()` method is no longer necessary, but still available for backward compatibility. |
44 | | - |
45 | | -- **Immutable Image Utility** - The Image utility class is now immutable. Each operation returns a new instance, allowing for method chaining and a more predictable workflow. |
46 | | - |
47 | | - ```php |
48 | | - $image = Image::read($url); |
49 | | - $resizedImage = $image->resize(100, 100); |
50 | | - // $image remains unchanged |
51 | | - |
52 | | - ``` |
53 | | -- **New Tensor Operations** - New operations were added: `copyTo`, `log`, `exp`, `pow`, `sum`, `reciprocal`, `stdMean`. Additionally, overall performance improvements have been made to Tensor operations. |
54 | | - |
55 | | -- **TextStreamer Improvements** - TextStreamer now prints to stdout by default. You can override this behavior using the `onStream(callable $callback)` method. Consequently, the `StdoutStreamer` class is now obsolete. |
56 | | - |
57 | | -- **VIPS PHP Driver Update** - The VIPS PHP driver is no longer bundled by default in `composer.json`. Detailed documentation is provided for installing the Vips PHP driver and setting up Vips on your machine. |
58 | | - |
59 | | -- **ONNX Runtime Upgrade** - Upgraded to version 1.19.0, bringing more performance and compatibility with newer models. |
60 | | - |
61 | | -- Bug Fixes & Performance Improvements - Various bug fixes have been implemented to enhance stability and performance across the package. |
62 | | - |
63 | | - |
64 | | -I hope you enjoy these updates and improvements. If you encounter any issues or have any suggestions, please don’t hesitate to reach out through our [Issue Tracker](https://github.com/CodeWithKyrian/transformers-php/issues) |
65 | | - |
66 | | -**Full Changelog**: https://github.com/CodeWithKyrian/transformers-php/compare/0.4.4...0.5.0 |
67 | | - |
68 | 5 | ## v0.4.4 - 2024-08-14 |
69 | 6 |
|
70 | 7 | ### What's Changed |
|
0 commit comments