Hecttor logo
Hecttor SDK Docs
Orpheus SDK

Getting Started

Orpheus is the Hecttor Speech Enhancer SDK for ASR pipelines. For supported models and a conceptual intro, see the Overview.

Installation

Orpheus ships as a platform-specific package matching your SDK language and runtime.

# Install the wheel that matches your Python version and OS, e.g.:
pip install hecttor_sdk-3.0.1-cp311-cp311-macosx_arm64.whl
# Install the .tgz that matches your platform, e.g.:
npm install ./hecttor_sdk-2.0.0-linux-x64-node.tgz
<!-- Maven: add the per-platform fat JAR to your project -->
<dependency>
  <groupId>io.hecttor</groupId>
  <artifactId>hecttor-sdk</artifactId>
  <version>2.0.0</version>
  <scope>system</scope>
  <systemPath>${project.basedir}/lib/hecttor_sdk-2.0.0-macos.jar</systemPath>
</dependency>
# CMakeLists.txt: point CMAKE_PREFIX_PATH at the unpacked SDK and link
list(APPEND CMAKE_PREFIX_PATH "/path/to/hecttor-sdk/lib/cmake")
find_package(HecttorSDK REQUIRED)
target_link_libraries(your_app PRIVATE Hecttor::SDK)
# Add the NuGet package (per-platform RIDs are bundled inside the .nupkg)
dotnet add package Hecttor.SDK --version 2.0.0
// go.mod — point the module at the extracted Go SDK directory
require hecttor.ai/sdk v1.0.0
replace hecttor.ai/sdk => /path/to/extracted/go
# Then make the binding find the native libs at runtime
export HECTTOR_SDK_LIB_DIR=/path/to/extracted/native
go build .

The exact install artifact varies by SDK language, platform, and runtime version. Use the package matching your environment; your license email or onboarding contact has the right link.

Configure your SDK key

Store your SDK key in an environment variable:

export HECTTOR_API_KEY="your_api_key_here"

Then read it from your application:

import os
api_key = os.environ["HECTTOR_API_KEY"]
const apiKey = process.env.HECTTOR_API_KEY;
String apiKey = System.getenv("HECTTOR_API_KEY");
#include <cstdlib>
const char* apiKey = std::getenv("HECTTOR_API_KEY");
string apiKey = Environment.GetEnvironmentVariable("HECTTOR_API_KEY");
import "os"

apiKey := os.Getenv("HECTTOR_API_KEY")

Never expose your SDK key in client-side code or commit it to version control.

Your first enhancement

import os
import numpy as np
from hecttor_sdk import ASRSpeechEnhancer, ASRSpeechEnhancerConfig, ModelConfig

config = ASRSpeechEnhancerConfig(
    api_key=os.environ["HECTTOR_API_KEY"],
    model_config=ModelConfig(model_name="your_model"),  # provided during onboarding
    chunk_size_ms=20,
    sample_rate=16000,
)

enhancer = ASRSpeechEnhancer()
success, error = enhancer.initialize(config)
if not success:
    raise RuntimeError(f"Orpheus initialization failed: {error}")

chunk_size = enhancer.get_chunk_size_samples()
audio_chunk = np.random.randn(chunk_size).astype(np.float32)  # replace with real audio

enhanced, error = enhancer.process_chunk(audio_chunk)
if enhanced is None:
    raise RuntimeError(f"Orpheus processing failed: {error}")

print(f"Enhanced {len(enhanced)} samples")
const { ASRSpeechEnhancer } = require('hecttor_sdk');

async function main() {
  const enhancer = new ASRSpeechEnhancer();

  await enhancer.initialize({
    apiKey: 'your_api_key_here',
    chunkSizeMs: 20,                                // 16 or 20 for "mist-1.0"/"crest-1.0"; 20 only for "crest-2.0"
    sampleRate: 16000,                              // Supported: 4000, 8000, 16000, 24000, 32000, 44100, 48000
    modelConfig: {
      modelName: 'your_model',                      // "mist-1.0", "crest-1.0", or "crest-2.0"
    },
  });

  const chunkSize = enhancer.getChunkSizeSamples();
  const audioChunk = new Float32Array(chunkSize);
  const enhanced = await enhancer.processChunk(audioChunk);
  console.log(`Successfully enhanced ${enhanced.length} samples!`);
}

main().catch((err) => {
  console.error('Error:', err.message);
  process.exit(1);
});
import io.hecttor.sdk.*;

public class QuickStart {
    public static void main(String[] args) {
        ASRSpeechEnhancerConfig config = ASRSpeechEnhancerConfig.builder("your_api_key_here")
            .chunkSizeMs(20)
            .sampleRate(16000)
            .model(new ASRSpeechEnhancerConfig.ModelConfig("your_model"))
            .build();

        try (ASRSpeechEnhancer enhancer = new ASRSpeechEnhancer()) {
            enhancer.initialize(config);
            int chunkSize = enhancer.getChunkSizeSamples();
            float[] audioChunk = new float[chunkSize];
            float[] enhanced = enhancer.processChunk(audioChunk);
            System.out.println("Successfully enhanced " + enhanced.length + " samples!");
        } catch (HecttorException e) {
            System.err.println("Error: " + e.getMessage());
            System.exit(1);
        }
    }
}
#include <hecttor/asr_speech_enhancer.hpp>
#include <iostream>
#include <vector>

int main() {
    try {
        hecttor::ASRSpeechEnhancerConfig config;
        config.apiKey = "your_api_key_here";
        config.chunkSizeMs = 20;
        config.sampleRate = 16000;
        config.modelConfig = hecttor::ModelConfig{"your_model"};

        hecttor::ASRSpeechEnhancer enhancer;
        enhancer.initialize(config);
        const size_t chunkSize = enhancer.getChunkSizeSamples();
        std::vector<float> audioChunk(chunkSize, 0.0f);
        std::vector<float> enhanced = enhancer.processChunk(audioChunk);
        std::cout << "Successfully enhanced " << enhanced.size() << " samples!\n";
    } catch (const std::exception& e) {
        std::cerr << "Error: " << e.what() << "\n";
        return 1;
    }
    return 0;
}
using System;
using Hecttor.SDK;

class Program
{
    static void Main()
    {
        var config = new ASRSpeechEnhancerConfig
        {
            ApiKey = "your_api_key_here",
            ChunkSizeMs = 20,
            SampleRate = 16000,
            Model = new ModelConfig { ModelName = "your_model" },
        };

        using var enhancer = new ASRSpeechEnhancer();
        try
        {
            enhancer.Initialize(config);
            int chunkSize = enhancer.ChunkSizeSamples;
            float[] audioChunk = new float[chunkSize];
            float[] enhanced = enhancer.ProcessChunk(audioChunk);
            Console.WriteLine($"Successfully enhanced {enhanced.Length} samples!");
        }
        catch (Exception ex)
        {
            Console.Error.WriteLine($"Error: {ex.Message}");
            Environment.Exit(1);
        }
    }
}
package main

import (
	"log"
	"os"

	hecttor "hecttor.ai/sdk"
)

func main() {
	enh, err := hecttor.NewASRSpeechEnhancer()
	if err != nil {
		log.Fatal(err)
	}
	defer enh.Close()

	if err := enh.Initialize(hecttor.ASRSpeechEnhancerConfig{
		APIKey:      os.Getenv("HECTTOR_API_KEY"),
		ChunkSizeMs: 20,                                            // 16 or 20 for "mist-1.0"/"crest-1.0"; 20 only for "crest-2.0"
		SampleRate:  16000,                                         // Supported: 4000, 8000, 16000, 24000, 32000, 44100, 48000
		Model:       hecttor.ModelConfig{ModelName: "your_model"},  // "mist-1.0", "crest-1.0", or "crest-2.0"
	}); err != nil {
		log.Fatal(err)
	}

	chunkSize, err := enh.ChunkSizeSamples()
	if err != nil {
		log.Fatal(err)
	}
	audioChunk := make([]float32, chunkSize)

	enhanced, err := enh.ProcessChunk(audioChunk)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Successfully enhanced %d samples!", len(enhanced))
}

That's the full integration shape. Initialize once, then call the per-chunk enhancement function on every audio chunk before it reaches your ASR.

A model configuration is required. Available models use different architectures, so your evaluation should compare them on your dataset and your ASR. See the Overview for guidance and Evaluations for protocol.

Integrating into an ASR pipeline

Orpheus is designed to sit between your audio source and your ASR. The integration shape is:

microphone / source -> chunker -> Orpheus enhance -> ASR

A few things to keep in mind:

  • Match chunk boundaries. Orpheus expects fixed-size chunks at the length it reports after initialization. If your ASR consumes a different chunk size, buffer Orpheus output before forwarding.
  • Same chunks, both passes. When evaluating, send the same audio through your ASR before and after Orpheus so WER comparisons are apples-to-apples.
  • Reuse the enhancer. Initialize once per session; initialization is the expensive step.

What to do next

  • See Examples for end-to-end shapes including offline evaluation runs.
  • Read Evaluations before running your first comparison; picking the wrong metric is the most common Orpheus integration mistake.