# Kotoba Realtime Speech-to-Text

> Live Japanese and English transcription over WebSocket, with partial results as the speaker talks.


## Overview

- **Endpoint**: `https://fal.run/kotoba-technologies/kotoba-streaming-stt/v1/speech-to-text`
- **Model ID**: `kotoba-technologies/kotoba-streaming-stt/v1/speech-to-text`
- **Category**: speech-to-text
- **Kind**: inference
**Description**: ## Kotoba Realtime Speech-to-Text

Stream audio in real time and receive transcript updates continuously while the speaker talks. Supports Japanese and English, with optional katakana rendering of names. Useful for live captions, meetings, voice agents, dictation, and accessibility.

### Playground demo
The Playground provides a one-shot demonstration, not a streaming interface. Supply an audio URL to receive the transcript. Maximum demo input: 5 minutes. Processing follows the input audio duration.

### Streaming API
Use the Kotoba Python SDK or a WebSocket client at `wss://fal.run/Kotoba-Technologies/kotoba-streaming-stt/v1/realtime`. The protocol follows the OpenAI Realtime transcription event format. Configure the target language, audio format, and sample rate, append audio chunks, and commit the stream to flush the remaining audio.

### Pricing
$0.39 per hour. The one-shot demo bills input audio seconds; the streaming API bills session seconds.

**Tags**: commercial-use, speech-to-text, japanese, english, realtime



## Pricing

Kotoba Streaming STT: $0.39 per hour of input audio for the one-shot demo; billed per input audio second.

For more details, see [fal.ai pricing](https://fal.ai/pricing).

## API Information

This model can be used via our HTTP API or more conveniently via our client libraries.
See the input and output schema below, as well as the usage examples.


### Input Schema

The API accepts the following input parameters:


- **`audio_url`** (`string`, _required_):
  Speech to transcribe: an https:// URL on fal's CDN (Playground uploads and microphone recordings) or a base64 data: URI. Up to 5 minutes.

- **`language`** (`LanguageEnum`, _required_):
  Language spoken in the audio.
  - Options: `"ja"`

- **`keywords`** (`list<string>`, _optional_):
  Up to 1000 terms of at most 64 characters, such as names or product words, whose spelling the transcript should prefer.
  - Array of string

- **`kana`** (`boolean`, _optional_):
  Write personal and place names in katakana (Japanese).
  - Default: `false`



**Required Parameters Example**:

```json
{
  "audio_url": "",
  "language": "ja"
}
```


### Output Schema

The API returns the following output format:

- **`text`** (`string`, _required_)

- **`language_code`** (`string`, _required_)

- **`audio_duration_secs`** (`float`, _optional_)

- **`language_probability`** (`float`, _required_)

- **`words`** (`list<SpeechToTextWord>`, _required_)
  - Array of SpeechToTextWord



**Example Response**:

```json
{
  "text": "",
  "language_code": "",
  "words": [
    {
      "text": "",
      "type": "word"
    }
  ]
}
```


## Usage Examples

### cURL

```bash
curl --request POST \
  --url https://fal.run/kotoba-technologies/kotoba-streaming-stt/v1/speech-to-text \
  --header "Authorization: Key $FAL_KEY" \
  --header "Content-Type: application/json" \
  --data '{
     "audio_url": "",
     "language": "ja"
   }'
```

### Python

Ensure you have the Python client installed:

```bash
pip install fal-client
```

Then use the API client to make requests:

```python
import fal_client

def on_queue_update(update):
    if isinstance(update, fal_client.InProgress):
        for log in update.logs:
           print(log["message"])

result = fal_client.subscribe(
    "kotoba-technologies/kotoba-streaming-stt/v1/speech-to-text",
    arguments={
        "audio_url": "",
        "language": "ja"
    },
    with_logs=True,
    on_queue_update=on_queue_update,
)
print(result)
```

### JavaScript

Ensure you have the JavaScript client installed:

```bash
npm install --save @fal-ai/client
```

Then use the API client to make requests:

```javascript
import { fal } from "@fal-ai/client";

const result = await fal.subscribe("kotoba-technologies/kotoba-streaming-stt/v1/speech-to-text", {
  input: {
    audio_url: "",
    language: "ja"
  },
  logs: true,
  onQueueUpdate: (update) => {
    if (update.status === "IN_PROGRESS") {
      update.logs.map((log) => log.message).forEach(console.log);
    }
  },
});
console.log(result.data);
console.log(result.requestId);
```


## Deploy your own model

To run your own weights, a fine-tune or a custom pipeline on the GPUs that serve this API, deploy it on fal Serverless. GPUs from H100 (80GB) to B300 (288GB), billed per second; an H100 is $4.50/h list, as low as $2.49/h. Prices, GPU specs and deploy steps: [fal Serverless](https://fal.ai/serverless.md).

## Additional Resources

### Documentation

- [Model Playground](https://fal.ai/models/kotoba-technologies/kotoba-streaming-stt/v1/speech-to-text)
- [API Documentation](https://fal.ai/models/kotoba-technologies/kotoba-streaming-stt/v1/speech-to-text/api)
- [OpenAPI Schema](https://fal.ai/api/openapi/queue/openapi.json?endpoint_id=kotoba-technologies/kotoba-streaming-stt/v1/speech-to-text)

### fal.ai Platform

- [Platform Documentation](https://fal.ai/docs/documentation)
- [Python Client](https://fal.ai/docs/api-reference/client-libraries/python)
- [JavaScript Client](https://fal.ai/docs/api-reference/client-libraries/javascript)

### Other agent-readable surfaces

This file covers one model. To find anything else:

- [Platform overview](https://fal.ai/llms.txt): Entry points and representative endpoint IDs
- [Documentation index](https://fal.ai/docs/llms.txt): Every documentation page
- [Full documentation text](https://fal.ai/docs/llms-full.txt): The whole documentation inlined
- [Pricing](https://fal.ai/pricing.md): Model API and Serverless GPU prices
- [fal Serverless](https://fal.ai/serverless.md): Deploy your own models: GPU prices, specs and steps
- Any other model: `https://fal.ai/models/<endpoint-id>/llms.txt`
