Skip to main content

GENSHI Works STT SDK — high-accuracy domain-specific speech-to-text

Project description

GENSHI Works STT SDK

High-accuracy domain-specific speech-to-text SDK. Supports batch transcription and realtime streaming with built-in VAD and on-device STT inference.

Installation

Python

pip install genshiai-stt

# With native runtime (recommended for production):
pip install genshiai-stt[native]

Node.js

npm install @genshiai/stt

The correct native addon for your platform is installed automatically via optional dependencies.

Browser

npm install @genshiai/stt-web

Quick Start

Python

import asyncio

from genshi_stt import GenshiSTTClient

async def main() -> None:
    async with GenshiSTTClient(api_key="gw-...") as client:
        with open("recording.wav", "rb") as f:
            result = await client.transcribe(f.read())
        print(result.text)

        async with client.stream(
            domain="medical",
            secure=True,
            dictionary_ids=["dict_hospital"],
            dictionaries=[
                {
                    "id": "dict_hospital",
                    "name": "院内用語",
                    "industry": "medical",
                    "terms": [{"term": "GENSHI AI", "reading": "げんしえーあい"}],
                }
            ],
        ) as session:
            events = await session.push(audio_chunk)  # PCM16 bytes
            print(events[0].text if events else "")
            final = await session.finalize()
            print(final.text)

asyncio.run(main())

Node.js / TypeScript

import { GenshiSTTClient } from '@genshiai/stt';

const client = new GenshiSTTClient({ apiKey: 'gw-...' });

// Batch transcription
const result = await client.transcribe(audioBuffer);
console.log(result.text);

// Realtime streaming
const session = client.stream({
  domain: 'medical',
  secure: true,
  dictionaryIds: ['dict_hospital'],
  dictionaries: [
    {
      id: 'dict_hospital',
      name: '院内用語',
      industry: 'medical',
      terms: [{ term: 'GENSHI AI', reading: 'げんしえーあい' }],
    },
  ],
});
const events = await session.push(pcm16Chunk);
console.log(events[0]?.text);
const final = await session.finalize();
console.log(final.text);

Browser

import { GenshiSTTClient, createMicStream } from '@genshiai/stt-web';

const client = new GenshiSTTClient({ apiKey: 'gw-...' });
await client.init();

const session = client.stream({
  domain: 'medical',
  secure: true,
  dictionaryIds: ['dict_hospital'],
  dictionaries: [
    {
      id: 'dict_hospital',
      name: '院内用語',
      industry: 'medical',
      terms: [{ term: 'GENSHI AI', reading: 'げんしえーあい' }],
    },
  ],
});

const mic = await createMicStream();
mic.onAudio(async (chunk) => {
  const events = await session.push(chunk);
  console.log(events[0]?.text);
});

// When done:
const result = await session.finalize();
console.log(result.text);

Prefer await session.finalize() when you need the final corrected text. await session.close() now performs a best-effort finalize for cleanup. Use session.abort() only for intentional force-abort without billing finalize.

secure=True / secure: true requests the Secure tier. Secure requests require an industry domain such as medical, or inline custom dictionaries.

Response

{
  "text": "今日は天気がいい",
  "raw_text": "きょうわ天気がいい",
  "processing_time_ms": 142
}

Supported Platforms

Platform Python Node.js
macOS ARM64 (Apple Silicon) genshiai-stt-native @genshiai/stt-native-darwin-arm64
Linux x64 genshiai-stt-native @genshiai/stt-native-linux-x64
Windows x64 genshiai-stt-native @genshiai/stt-native-windows-x64
Browser @genshiai/stt-web

Requirements

  • Python >= 3.10 / Node.js >= 20
  • Valid GENSHI Works API key
  • ffmpeg (Node.js batch decode only)

Browser SDK note:

  • await client.init() is required before transcribe() or realtime()
  • the npm package includes JSON metadata, and secured ONNX assets are fetched via POST /v1/activate

Documentation

Full documentation: https://docs.genshi.ai/stt

License

Proprietary. Copyright (c) 2026 GENSHI Works Inc. All rights reserved. See LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

genshiai_stt-1.0.2.tar.gz (9.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

genshiai_stt-1.0.2-py3-none-any.whl (11.2 kB view details)

Uploaded Python 3

File details

Details for the file genshiai_stt-1.0.2.tar.gz.

File metadata

  • Download URL: genshiai_stt-1.0.2.tar.gz
  • Upload date:
  • Size: 9.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for genshiai_stt-1.0.2.tar.gz
Algorithm Hash digest
SHA256 f3e31f047e9a49350d56760a185b8a37378f9d17cc6c6e74248b138218b895c9
MD5 3e7a2b1ca675558996cd575246478f4a
BLAKE2b-256 58efd8c0d8d62ed77a425fff45ccd1a064e6f57f0e192baac941751166920f60

See more details on using hashes here.

File details

Details for the file genshiai_stt-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: genshiai_stt-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 11.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for genshiai_stt-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a81c89f268de677f20ac3ac173a63f49dd5cf18fb05718b6768555e5ae237bdc
MD5 858dafd1ef5e1bc2f6522f590f06514a
BLAKE2b-256 3b7c740bd9de16b830aaf7c8338ef4ee21cfac12dcd4965e5c7f0e9a81b0136b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page