PHPackages                             caraxes/speech-texter - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. caraxes/speech-texter

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

caraxes/speech-texter
=====================

A Laravel package for speech-to-text processing.

v0.0.28(1y ago)016MITPHPCI passing

Since Feb 20Pushed 1y ago1 watchersCompare

[ Source](https://github.com/AmirMahdi-for/SpeechTexter)[ Packagist](https://packagist.org/packages/caraxes/speech-texter)[ RSS](/packages/caraxes-speech-texter/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (29)Used By (0)

SpeechTexter Laravel Package
============================

[](#speechtexter-laravel-package)

SpeechTexter is a Laravel package that simplifies speech-to-text processing by integrating with external services. This package provides an easy way to store, manage, and retrieve transcribed audio files while allowing full flexibility in configuring dependencies such as user and file models.

🚀 Features
----------

[](#-features)

- Seamless speech-to-text integration
- Configurable API endpoints
- Dynamic model binding for User and File
- Supports Laravel migrations and service providers
- Queued job processing for speech recognition requests
- Storage support for temporary and persistent audio files
- Validation for user inputs and API requests

📞 External Service
------------------

[](#-external-service)

This package integrates with the **ussistant** speech recognition service for Persian language support. If you intend to use this package for Persian speech-to-text conversion, please refer to the API documentation and services provided by [ussistant](https://ussistant.ir/).

📦 Installation
--------------

[](#-installation)

You can install this package via Composer:

```
composer require caraxes/speech-texter
```

After installation, publish the package configuration:

```
php artisan vendor:publish --tag=speech-texter-config
```

### Example `config/speech-texter.php`:

[](#example-configspeech-texterphp)

```
return [
    'api_key' => env('SPEECH_TEXTER_X_API_KEY'),
    'voice_api' => env('SPEECH_TEXTER_VOICE_API'),
    'prefix' => 'speech-texter',
    'user_model' => env('SPEECH_TEXTER_USER_MODEL', 'App\Models\User'),
    'file_model' => env('SPEECH_TEXTER_FILE_MODEL', 'App\Models\File'),
];
```

🔧 Usage
-------

[](#-usage)

### 1️⃣ Storing a Speech-to-Text Request

[](#1️⃣-storing-a-speech-to-text-request)

To store a new request, simply create a new `SpeechTexter` model instance:

```
use SpeechTexter\Models\SpeechTexter;

$record = SpeechTexter::create([
    'user_id' => auth()->id(),
    'file_id' => $fileId,
    'file_url' => $fileUrl,
    'file' => $fileData,
    'result' => json_encode($transcriptionResult),
    'response_status_code' => 200,
]);
```

### 2️⃣ Retrieving Speech-to-Text Results

[](#2️⃣-retrieving-speech-to-text-results)

To get the transcribed result of a specific file:

```
$record = SpeechTexter::find($id);
echo $record->result;
```

### 3️⃣ Handling Speech-to-Text Requests in the Repository

[](#3️⃣-handling-speech-to-text-requests-in-the-repository)

```
use SpeechTexter\Repositories\SpeechTexterRepository;

$speechTexterRepo = new SpeechTexterRepository();
$response = $speechTexterRepo->speechToText($userId, $fileId, [
    'file' => $uploadedFile,
]);
```

### 4️⃣ Accessing Related Models

[](#4️⃣-accessing-related-models)

```
$user = $record->user;
$file = $record->file;
```

### 5️⃣ Validating Inputs

[](#5️⃣-validating-inputs)

```
use SpeechTexter\Validators\SpeechTexterValidator;

$validator = new SpeechTexterValidator();
$validator->validate($data);
```

⚙️ Service Provider
-------------------

[](#️-service-provider)

Make sure Laravel detects the service provider automatically:

```
'providers' => [
    SpeechTexter\Providers\SpeechTexterServiceProvider::class,
],
```

🏗 Running Migrations
--------------------

[](#-running-migrations)

```
php artisan migrate
```

🏗 Queue Processing
------------------

[](#-queue-processing)

To handle speech recognition requests asynchronously:

```
php artisan queue:work
```

🔍 Continuous Integration (CI) Tests
-----------------------------------

[](#-continuous-integration-ci-tests)

This package is tested automatically using GitHub Actions with the following checks:

- **Code Quality:** Static analysis with PHPStan (`level=2`) to ensure code correctness.
- **Dependency Management:** Ensures all dependencies are installed and autoloaded correctly.
- **Laravel Optimization:** Caches configurations and optimizes performance.
- **Database Migrations:** Runs migrations to verify schema integrity.
- **Queue Handling:** Configures queue driver for synchronous execution.

These tests ensure the package remains stable and functional in Laravel 11 environments.

🔒 Security
----------

[](#-security)

- Do not expose your API key in the frontend.
- Use environment variables for API keys and secrets.
- Ensure your file uploads are properly sanitized to prevent security risks.

📝 License
---------

[](#-license)

This package is open-source and licensed under the MIT License.

🤝 Contributing
--------------

[](#-contributing)

We welcome contributions! Feel free to submit pull requests and report issues in the GitHub repository.

📞 Support
---------

[](#-support)

For support, please open an issue on GitHub or contact me personally via email at ****.

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance47

Moderate activity, may be stable

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

28

Last Release

430d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/f8719c61ab19a500f5d982df143f2e18d39cacd9cb4952c568f099984d44cb1f?d=identicon)[jackal](/maintainers/jackal)

---

Top Contributors

[![AmirMahdi-for](https://avatars.githubusercontent.com/u/97610864?v=4)](https://github.com/AmirMahdi-for "AmirMahdi-for (44 commits)")

### Embed Badge

![Health badge](/badges/caraxes-speech-texter/health.svg)

```
[![Health](https://phpackages.com/badges/caraxes-speech-texter/health.svg)](https://phpackages.com/packages/caraxes-speech-texter)
```

###  Alternatives

[symfony/polyfill-uuid

Symfony polyfill for uuid functions

688335.4M63](/packages/symfony-polyfill-uuid)[spatie/error-solutions

This is my package error-solutions

6853.2M11](/packages/spatie-error-solutions)[phpflo/phpflo

Flow-based programming for PHP

2173.3k4](/packages/phpflo-phpflo)[eftec/autoloadone

AutoloadOne is a program that generates an autoload class for PHP.

403.4k](/packages/eftec-autoloadone)[ys-tools/default-theme-configuration-bundle

OroCommerce Default Theme Configuration Bundle

124.2k](/packages/ys-tools-default-theme-configuration-bundle)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
