Skip to content

Commit 4c3e22d

Browse files
CodeWithKyriangithub-actions[bot]
authored andcommitted
Update CHANGELOG
1 parent 18eae90 commit 4c3e22d

File tree

1 file changed

+66
-0
lines changed

1 file changed

+66
-0
lines changed

CHANGELOG.md

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,69 @@
22

33
All notable changes to `transformers-php` will be documented in this file.
44

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+
568
## v0.4.4 - 2024-08-14
669

770
### What's Changed
@@ -151,6 +214,7 @@ composer require codewithkyrian/transformers
151214

152215

153216

217+
154218
```
155219
And you must initialize the library to download neccesary libraries for ONNX
156220

@@ -166,6 +230,7 @@ And you must initialize the library to download neccesary libraries for ONNX
166230

167231

168232

233+
169234
```
170235
#### Checkout the Documentation
171236

@@ -187,6 +252,7 @@ To ensure a smooth user experience, especially with larger models, we recommend
187252

188253

189254

255+
190256
```
191257
#### What's Next?
192258

0 commit comments

Comments
 (0)