Skip to main content

SambaNova SambaNova STT

The SambaNovaSTTService provides high-efficiency inference for real-time speech transcription using SambaNova's optimized Whisper API.

Installation

To use SambaNova, install the required dependencies:

pip install "piopiy-ai[sambanova]"

Prerequisites

  • A SambaNova account and API key (Get yours here).
  • Set your API key in your environment:
    export SAMBANOVA_API_KEY="your_api_key_here"

Configuration

SambaNovaSTTService Parameters

ParameterTypeDefaultDescription
api_keystrRequiredYour SambaNova API key.
modelstr"Whisper-Large-v3"The Whisper model to use.
base_urlstr"https://api.sambanova.ai/v1"SambaNova API base URL.
languageLanguageLanguage.ENLanguage of the audio input.
promptstrNoneOptional text to guide the model's style.
temperaturefloat0.0Sampling temperature between 0 and 1.

Usage

Basic Setup

import os
from piopiy.services.sambanova.stt import SambaNovaSTTService

stt = SambaNovaSTTService(
api_key=os.getenv("SAMBANOVA_API_KEY")
)

With Custom Model and Language

import os
from piopiy.services.sambanova.stt import SambaNovaSTTService
from piopiy.transcriptions.language import Language

stt = SambaNovaSTTService(
api_key=os.getenv("SAMBANOVA_API_KEY"),
model="Whisper-Large-v3",
language=Language.EN_US
)

Notes

  • Optimized Inference: SambaNova's platform is engineered for extremely fast execution of foundation models like Whisper.
  • Probability Metrics: Note that SambaNova STT does not currently support probability metrics.