GENSHI Voice 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
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-...", secure=True) as client:
with open("recording.wav", "rb") as f:
result = await client.transcribe(
f.read(),
model="genshi-stt-v1-pro",
domain="medical",
)
print(result.text)
for seg in result.segments:
print(f"[{seg.start:.2f}-{seg.end:.2f}] {seg.text}")
async with client.stream(
model="genshi-stt-v1-pro-plus",
effort="normal",
dictionary_ids=["dict_hospital"],
) as session:
partials = await session.push(audio_chunk) # PCM16 bytes
print(partials[0].text if partials else "")
refined = await session.drain_events()
for event in refined:
if event.type == "refined":
print(event.index, event.text)
final = await session.finalize()
print(final.text)
asyncio.run(main())
Node.js / TypeScript
import { GenshiSTTClient } from '@genshiai/stt';
const client = new GenshiSTTClient({ apiKey: 'gw-...', secure: true });
// Batch transcription
const result = await client.transcribe(audioBuffer, {
model: 'genshi-stt-v1-pro',
domain: 'medical',
});
console.log(result.text);
for (const seg of result.segments) {
console.log(`[${seg.start.toFixed(2)}-${seg.end.toFixed(2)}] ${seg.text}`);
}
// Realtime streaming
const session = client.stream({
model: 'genshi-stt-v1-pro-plus',
effort: 'normal',
dictionaryIds: ['dict_hospital'],
});
const partials = await session.push(pcm16Chunk);
console.log(partials[0]?.text);
const refined = await session.drainEvents();
for (const event of refined) {
if (event.type === 'refined') {
console.log(event.index, event.text);
}
}
const final = await session.finalize();
console.log(final.text);
Browser
import { GenshiSTTClient, createMicStream } from '@genshiai/stt-web';
const client = new GenshiSTTClient({ apiKey: 'gw-...', secure: true });
await client.init();
const session = client.stream({
model: 'genshi-stt-v1-pro-plus',
effort: 'normal',
dictionaryIds: ['dict_hospital'],
});
const mic = await createMicStream({
onChunk: async (chunk) => {
const partials = await session.push(chunk);
console.log(partials[0]?.text);
const refined = await session.drainEvents();
for (const event of refined) {
if (event.type === 'refined') {
console.log(event.index, event.text);
}
}
},
});
// When done:
mic.stop();
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.
Choosing A Mode
| Mode | During recording | Correction cadence | Recommended for |
|---|---|---|---|
batch |
Nothing is emitted until the request finishes | One final full-text pass | File upload, post-processing |
realtime + effort="normal" |
partial text appears immediately |
Background correction is sparse | Dictation, meeting notes, standard live input |
realtime + effort="high" |
partial text appears immediately |
Background correction is more frequent | Live captions, simultaneous charting, terminology-sensitive input |
Realtime Mental Model
push()returns immediatepartialevents from local STTdrain_events()/drainEvents()returns queuedrefined/errorevents from background correctioneffort: "normal"batches corrections sparsely,effort: "high"refines more oftenfinalize()still performs the final full-text correction pass
Public SDK configuration is intentionally centered on model, optional domain, dictionaryIds or dictionaries="bound", and effort.
secure=True / secure: true is honored only when the API key is configured as flexible; normal keys ignore it and secure-only keys force it on every request. Configure the policy at key creation time in Console.
Low-level VAD and local model tuning are not part of the public API.
Realtime Event Example
push() returns a partial event:
{
"type": "partial",
"text": "ほんじつのけつあつは130の80です。",
"index": 0,
"processing_time_ms": 0
}
drain_events() / drainEvents() returns a refined event for the same segment:
{
"type": "refined",
"text": "本日の血圧は130の80です。",
"index": 0,
"processing_time_ms": 88
}
Response
{
"text": "本日の血圧は130の80です。次の患者さんをお願いします。",
"processing_time_ms": 142,
"segments": [
{
"id": 0,
"start": 0.32,
"end": 2.15,
"text": "本日の血圧は130の80です。"
},
{
"id": 1,
"start": 3.2,
"end": 4.8,
"text": "次の患者さんをお願いします。"
}
]
}
Pricing
Point-based billing. 1pt = ¥10. Billed per audio hour.
| Model | Standard billing | secure billing |
|---|---|---|
genshi-stt-v1-lite |
2 pt/h (¥20) | 5 pt/h (¥50) |
genshi-stt-v1-standard |
6 pt/h (¥60) | 9 pt/h (¥90) |
genshi-stt-v1-pro |
10 pt/h (¥100) | 13 pt/h (¥130) |
genshi-stt-v1-pro-plus |
13 pt/h (¥130) | 15 pt/h (¥150) |
Validation matrix:
lite: domain NG, dictionaries NGnormal: domain NG, dictionaries NGpro: non-generaldomain required, dictionaries NGpro-plus:dictionaryIdsordictionaries="bound"required, both together NG
See https://docs.genshi.ai/stt/pricing for details.
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 Voice API key
ffmpegfor Python file/bytes decode and Node.js encoded audio decode
Browser SDK note:
await client.init()is required beforetranscribe()orrealtime()- 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 AI Inc. All rights reserved. See LICENSE.
Metadata
Release files for genshiai-stt 5.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| genshiai_stt-5.2.0.tar.gz | 13.5 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| genshiai_stt-5.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 26.5 kB
Release files / genshiai_stt-5.2.0.tar.gz
| Download URL | genshiai_stt-5.2.0.tar.gz |
|---|---|
| Size | 13.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d7539af2447c98df79f8d2468b92afcfd163b3afdc19b258d5a4e4fe4d5f9562
|
|
BLAKE2b-256 checksum How to use checksums |
cbe1aa4fbe55259b7f0b06dc905f3ca69dd57edb120d4f8e761fde3603842201
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.13
|
Release files / genshiai_stt-5.2.0-py3-none-any.whl
| Download URL | genshiai_stt-5.2.0-py3-none-any.whl |
|---|---|
| Size | 13.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f1cf96a76ceb5a6576b372c0860bf97e4ace0f5d7ca9222cad0504c5d5ea8d53
|
|
BLAKE2b-256 checksum How to use checksums |
dcb20692a4e78843684f3c449d43956d3b3a9bcb837fdec872d65479ba6a4c75
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.13
|
Security for genshiai-stt 5.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.