PHPackages                             vocapia/voxsigma - 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. [API Development](/categories/api)
4. /
5. vocapia/voxsigma

ActiveLibrary[API Development](/categories/api)

vocapia/voxsigma
================

PHP SDK for Vocapia VoxSigma speech-to-text binaries and REST API

2.7.0(1mo ago)079MITPHPPHP &gt;=8.1

Since Dec 18Pushed 1mo agoCompare

[ Source](https://github.com/Gizmo091/vocapia_voxsigma_php)[ Packagist](https://packagist.org/packages/vocapia/voxsigma)[ RSS](/packages/vocapia-voxsigma/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (2)Versions (20)Used By (0)

VoxSigma PHP SDK
================

[](#voxsigma-php-sdk)

PHP SDK for [Vocapia](https://www.vocapia.com/) VoxSigma speech-to-text, supporting both CLI binaries and REST API.

Requirements
------------

[](#requirements)

- PHP 8.1+
- ext-curl (for REST driver)
- VoxSigma binaries installed locally (for CLI driver) OR REST API credentials

Installation
------------

[](#installation)

```
composer require vocapia/voxsigma
```

Quick Start
-----------

[](#quick-start)

### CLI Driver (local binaries)

[](#cli-driver-local-binaries)

```
use Vocapia\Voxsigma\VoxSigma;

$vox = VoxSigma::cli('/usr/local/vrxs');

$response = $vox->trans()
    ->model('fre')
    ->file('/path/to/audio.wav')
    ->run();

echo $response->getXml();
```

### REST Driver (remote API)

[](#rest-driver-remote-api)

```
use Vocapia\Voxsigma\VoxSigma;
use Vocapia\Voxsigma\Auth\UserPasswordCredential;

$credential = new UserPasswordCredential('user', 'password');
$vox = VoxSigma::rest('https://your-voxsigma-server.com', $credential);

$response = $vox->trans()
    ->model('fre')
    ->file('/path/to/audio.wav')
    ->run();

echo $response->getXml();
```

Authentication (REST)
---------------------

[](#authentication-rest)

### HTTP Basic Auth

[](#http-basic-auth)

```
use Vocapia\Voxsigma\Auth\UserPasswordCredential;

$credential = new UserPasswordCredential('username', 'password');
```

### API Key

[](#api-key)

```
use Vocapia\Voxsigma\Auth\ApiKeyCredential;

$credential = new ApiKeyCredential('your-api-key');
```

Methods
-------

[](#methods)

### Transcription (trans)

[](#transcription-trans)

```
use Vocapia\Voxsigma\Model\LanguageList;

$response = $vox->trans()
    ->model('fre')                    // Language model (fre, eng-usa, etc.)
    ->file('/path/to/audio.wav')      // Audio file
    ->speakerCount(max: 2)            // Limit speaker count
    ->speakerCount(min: 1, max: 4)    // Min/max speakers
    ->dualChannel()                   // Enable dual channel mode
    ->noPartitioning()                // Disable speaker partitioning
    ->languageList(                   // Restrict languages for detection
        LanguageList::create()
            ->add('fre')
            ->add('eng-usa')
    )
    ->verbose()                       // Enable verbose output
    ->run();
```

### Speaker Partitioning (part)

[](#speaker-partitioning-part)

```
$response = $vox->part()
    ->model('fre')
    ->file('/path/to/audio.wav')
    ->speakerCount(min: 2, max: 6)   // Min/max speakers
    ->minSpeakers(2)                  // Min speakers only
    ->maxSpeakers(4)                  // Max speakers only
    ->channel(1)                      // Select channel
    ->run();
```

### Language Identification (lid)

[](#language-identification-lid)

```
use Vocapia\Voxsigma\Model\LanguageList;

$response = $vox->lid()
    ->model('fre')
    ->file('/path/to/audio.wav')
    ->duration(30.0)                  // Speech duration to process
    ->duration(30.0, 5.0, 120.0)     // With min/max segment durations
    ->threshold(0.5)                  // Detection threshold
    ->version('7.1')                  // LID version
    ->languageList(                   // Restrict to specific languages
        LanguageList::create()
            ->add('fre')
            ->add('eng-usa')
            ->add('eng-gbr')
    )
    ->run();
```

Or use an existing language list file:

```
$response = $vox->lid()
    ->model('fre')
    ->file('/path/to/audio.wav')
    ->languageListFile('/path/to/languages.lst')
    ->run();
```

### Forced Alignment (align) - REST

[](#forced-alignment-align---rest)

```
$response = $vox->align()
    ->model('fre')
    ->file('/path/to/audio.wav')
    ->textFile('/path/to/transcript.txt')
    ->speakerSegmentation()
    ->run();
```

### DTMF Detection (dtmf) - CLI only

[](#dtmf-detection-dtmf---cli-only)

```
$response = $vox->dtmf()
    ->file('/path/to/audio.wav')
    ->run();
```

### Keyword Spotting (kws) - CLI only

[](#keyword-spotting-kws---cli-only)

Search for keywords phonetically and textually in transcription files:

```
use Vocapia\Voxsigma\Model\KeywordList;
use Vocapia\Voxsigma\Model\FileList;

$response = $vox->kws()
    ->keywordList(
        KeywordList::create()
            ->add('KW001', 0.5, 'hello world')
            ->add('KW002', 0.4, 'bonjour')
            ->addKeyword('keyword', 0.5)  // Auto-generated ID
    )
    ->inputFiles(
        FileList::create()
            ->add('/path/to/transcription1.kar')
            ->add('/path/to/transcription2.kar')
    )
    ->context(5)  // Include 5 seconds of surrounding words
    ->run();
```

Or use existing files:

```
$response = $vox->kws()
    ->keywordListFile('/path/to/keywords.kwl')
    ->inputKarList('/path/to/files.klst')
    ->context(5)
    ->run();
```

**Keyword list file format (.kwl):**

```
KW001 0.5 hello world
KW002 0.4 bonjour
KW003 0.5 keyword

```

Columns: ID, threshold (0.0-1.0), keyword text

**Input list file format (.klst):**

```
/path/to/file1.kar
/path/to/file2.kar

```

### XML to KAR Converter (xml2kar) - CLI only

[](#xml-to-kar-converter-xml2kar---cli-only)

Convert XML transcription files to KAR format for keyword spotting:

```
$response = $vox->xml2kar()
    ->xmlFile('/path/to/transcription.xml')
    ->karFile('/path/to/output.kar')
    ->run();

if ($response->isSuccess()) {
    // KAR file created at /path/to/output.kar
}
```

### Hello (REST connection test)

[](#hello-rest-connection-test)

```
$response = $vox->hello()->run();

if ($response->isSuccess()) {
    echo "Connected!";
}
```

Async Execution (REST)
----------------------

[](#async-execution-rest)

```
$handle = $vox->trans()
    ->model('fre')
    ->file('/path/to/audio.wav')
    ->runAsync();

// Poll for completion
while ($handle->isRunning()) {
    sleep(5);
}

$response = $handle->wait();
```

Check status of a session:

```
$response = $vox->status()
    ->session($handle->getId())
    ->run();
```

Pipeline (CLI only)
-------------------

[](#pipeline-cli-only)

Chain multiple operations using Unix pipes:

```
$response = $vox->pipeline()
    ->input('/path/to/audio.wav')
    ->dtmf()
    ->part()->maxSpeakers(2)->done()
    ->lid()
    ->trans()->model('fre')->done()
    ->run();
```

Response
--------

[](#response)

```
$response = $vox->trans()->model('fre')->file($audio)->run();

// Check status
$response->isSuccess();     // bool
$response->getError();      // ?string
$response->getErrorCode();  // ?int (VoxSigma error code)

// Get result
$response->getXml();        // Raw XML string

// HTTP/CLI info
$response->getHttpStatus(); // ?int (REST only)
$response->getExitCode();   // ?int (CLI only)
```

Configuration
-------------

[](#configuration)

### From environment

[](#from-environment)

```
use Vocapia\Voxsigma\Config\Configuration;

// Reads VOCAPIA_VOXSIGMA_* environment variables
$config = Configuration::fromEnvironment();
$vox = new VoxSigma($config);
```

Environment variables:

- `VOCAPIA_VOXSIGMA_DRIVER` - `cli` or `rest`
- `VOCAPIA_VOXSIGMA_VRXS_ROOT` - CLI installation path
- `VOCAPIA_VOXSIGMA_REST_URL` - REST API URL
- `VOCAPIA_VOXSIGMA_REST_USER` - REST username
- `VOCAPIA_VOXSIGMA_REST_PASSWORD` - REST password

### Manual configuration

[](#manual-configuration)

```
use Vocapia\Voxsigma\Config\Configuration;
use Vocapia\Voxsigma\Auth\UserPasswordCredential;

// CLI
$config = Configuration::cli(
    root: '/usr/local/vrxs',
    tmp: '/tmp'
);

// REST
$config = Configuration::rest(
    baseUrl: 'https://your-voxsigma-server.com',
    credential: new UserPasswordCredential('user', 'pass')
);

$vox = new VoxSigma($config);
```

Debugging
---------

[](#debugging)

### CLI

[](#cli)

Generate the equivalent CLI command for debugging:

```
$cli = $vox->trans()
    ->model('fre')
    ->file('/path/to/audio.wav')
    ->toCli();

echo $cli;
// /usr/local/vrxs/bin/vrxs_trans -lfre -f '/path/to/audio.wav'
```

### REST

[](#rest)

Generate the equivalent curl command for debugging:

```
$curl = $vox->trans()
    ->model('fre')
    ->file('/path/to/audio.wav')
    ->toCurl();

echo $curl;
// curl -k -u user:password -F model=fre -F audiofile=@/path/to/audio.wav 'https://server/voxsigma?method=vrxs_trans'
```

For async requests:

```
$curl = $vox->trans()
    ->model('fre')
    ->file('/path/to/audio.wav')
    ->toCurl(async: true);
```

Error Handling
--------------

[](#error-handling)

```
use Vocapia\Voxsigma\Exception\DriverException;
use Vocapia\Voxsigma\Exception\RequestFailedException;

try {
    $response = $vox->trans()->model('fre')->file($audio)->run();

    if (!$response->isSuccess()) {
        echo "Error: " . $response->getError();
        echo "Code: " . $response->getErrorCode();
    }
} catch (DriverException $e) {
    // Driver-level error (file not found, connection failed, etc.)
    echo $e->getMessage();
}
```

License
-------

[](#license)

MIT

###  Health Score

43

—

FairBetter than 91% of packages

Maintenance90

Actively maintained with recent releases

Popularity13

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 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 ~5 days

Recently: every ~12 days

Total

19

Last Release

47d ago

Major Versions

1.2.2 → 2.0.2-alpha2025-12-18

### Community

Maintainers

![](https://www.gravatar.com/avatar/6045f24a5a5342628edcac98302f5ab2a6e4acfba94e79876730da54424e177d?d=identicon)[Mathieu Vedie](/maintainers/Mathieu%20Vedie)

---

Top Contributors

[![Gizmo091](https://avatars.githubusercontent.com/u/289745?v=4)](https://github.com/Gizmo091 "Gizmo091 (28 commits)")

---

Tags

Transcriptionspeech-to-textasrvocapiavoxsigmastt

###  Code Quality

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/vocapia-voxsigma/health.svg)

```
[![Health](https://phpackages.com/badges/vocapia-voxsigma/health.svg)](https://phpackages.com/packages/vocapia-voxsigma)
```

###  Alternatives

[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)[google/common-protos

Google API Common Protos for PHP

173103.7M50](/packages/google-common-protos)[hubspot/api-client

Hubspot API client

23414.2M16](/packages/hubspot-api-client)

PHPackages © 2026

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