# AI use cases for Speech CPP (nyosegawa/speech.cpp)

Repo: [nyosegawa/speech.cpp](https://github.com/nyosegawa/speech.cpp) | Use cases: 5 | Page: https://dedupedai.com/use-cases/nyosegawa-speech-cpp/

speech.cpp is a C++ command and library on ggml for speech synthesis, speech recognition and voice activity detection, running on the CPU, Metal or Vulkan with an OpenAI-compatible server.

This file holds every use case of this repo. Each one starts with a "## " heading and ends with its URL.

- Transcribe long Japanese recordings with timestamps: https://dedupedai.com/use-cases/nyosegawa-speech-cpp/transcribe-japanese-recordings-with-timestamps/
- Caption the microphone live as you speak: https://dedupedai.com/use-cases/nyosegawa-speech-cpp/caption-the-microphone-as-you-speak/
- Generate spoken narration audio from a text file: https://dedupedai.com/use-cases/nyosegawa-speech-cpp/generate-narration-audio-from-text/
- Run a local OpenAI-style audio API for an app: https://dedupedai.com/use-cases/nyosegawa-speech-cpp/serve-openai-audio-api-on-localhost/
- Keep speech models loaded in a worker process: https://dedupedai.com/use-cases/nyosegawa-speech-cpp/run-speech-worker-for-a-program/

## How to transcribe long Japanese recordings with timestamps with Speech CPP

Repo: [nyosegawa/speech.cpp](https://github.com/nyosegawa/speech.cpp) | Difficulty: Intermediate | Time: 30 minutes | Basis: From the README

Turn a Japanese meeting or interview recording into punctuated text with times, on your own machine.

**Who it is for:** A researcher, journalist or team member with long Japanese audio recordings who needs a searchable transcript without uploading the files to a cloud service.

**The problem:** Long Japanese recordings are slow to type up by hand, and cloud transcription may not suit private material.

**The outcome:** A text transcript of the recording with timestamps, produced locally by the reazonspeech-v2 model.

### Steps

1. Install speech with `curl -fsSL https://raw.githubusercontent.com/nyosegawa/speech.cpp/main/install.sh | sh` on macOS or Linux, or `irm https://raw.githubusercontent.com/nyosegawa/speech.cpp/main/install.ps1 | iex` in PowerShell on Windows.
2. Put the recording in a WAVE file, for example meeting.wav.
3. Run `speech asr reazonspeech-v2 --timestamps meeting.wav`. The model is fetched the first time.
4. Check the first few lines of the output against the audio, since the model is for Japanese only.

### Prompt to paste into your agent

```text
Using the speech.cpp repo (nyosegawa/speech.cpp), install the speech command, then run `speech asr reazonspeech-v2 --timestamps <path-to-wav>` on the target WAVE file. Expected output: Japanese text with timestamps printed to the terminal. Verify that the first line matches the opening words of the audio.
```

### Caveat

The reazonspeech-v2 model in the README is listed for Japanese only, so use qwen3-asr or parakeet models for other languages.

Risk, remote script: The install step runs a shell or PowerShell script fetched from the internet, so read it first if your policy requires it.

Dual-use notice: only use this on software, sites and systems you own or are authorized to test.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/nyosegawa-speech-cpp/transcribe-japanese-recordings-with-timestamps/

## How to caption the microphone live as you speak with Speech CPP

Repo: [nyosegawa/speech.cpp](https://github.com/nyosegawa/speech.cpp) | Difficulty: Intermediate | Time: 30 minutes | Basis: From the README

Show a live text transcript of your speech, with silence filtered out by a voice activity model.

**Who it is for:** A presenter, streamer or developer building a voice conversation who needs on-screen or in-app captions from a microphone.

**The problem:** Live captions usually depend on a cloud service, and raw microphone audio includes silences that waste recognition time.

**The outcome:** A terminal that writes the transcript as you talk, with the utterance still being said shown in grey.

### Steps

1. Install speech using the installer for your platform from the install section of the README.
2. Run `speech asr reazonspeech-v2 --vad silero-vad --live` to transcribe the microphone.
3. Speak a sentence and watch the grey text update until the utterance ends.
4. Stop the command when finished with Ctrl+C (inferred).

### Prompt to paste into your agent

```text
In the nyosegawa/speech.cpp repo, after installing speech, run `speech asr reazonspeech-v2 --vad silero-vad --live` and speak one Japanese sentence into the microphone. Expected output: the sentence appears as text in the terminal after you finish it. Verify that the words shown match what was said.
```

### Caveat

The README describes live transcription for the command line, and the microphone must be available to the terminal session on your machine.

Risk, remote script: The install step runs a script fetched from the internet, so review it before running.

Dual-use notice: only use this on software, sites and systems you own or are authorized to test.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/nyosegawa-speech-cpp/caption-the-microphone-as-you-speak/

## How to generate spoken narration audio from a text file with Speech CPP

Repo: [nyosegawa/speech.cpp](https://github.com/nyosegawa/speech.cpp) | Difficulty: Beginner | Time: 30 minutes | Basis: From the README

Turn a script into a WAVE file of speech using a local Qwen3-TTS voice.

**Who it is for:** A content creator, teacher or developer who needs narration for a video, lesson or prototype and wants to avoid a paid voice service.

**The problem:** Recording narration takes time, and cloud text-to-speech may be costly or send private scripts off the machine.

**The outcome:** A WAVE file with the spoken text, produced locally from a named voice.

### Steps

1. Install speech using the installer for your platform.
2. Run `speech tts qwen3-tts-0.6b --voice ryan -o hello.wav "Hello. It will be sunny in Tokyo tomorrow."` to make the first file. The model is fetched the first time.
3. Replace the quoted text with your own sentence, or pipe a file to stdout with `speech tts qwen3-tts-0.6b --voice ryan -o -` (inferred from the README's note that output can go to stdout). (inferred, check the README)
4. Play hello.wav and check the pronunciation.

### Prompt to paste into your agent

```text
Using the nyosegawa/speech.cpp repo, install speech and run `speech tts qwen3-tts-0.6b --voice ryan -o <output>.wav "<script text>"`. Expected output: a WAVE file at the path given, with the script spoken in the ryan voice. Verify that the file plays and matches the script.
```

### Caveat

The first run downloads a 1.21 GB model, so plan for that time and disk space before generating audio.

Risk, remote script: The install step runs a script fetched from the internet, so review it before running.

Dual-use notice: only use this on software, sites and systems you own or are authorized to test.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/nyosegawa-speech-cpp/generate-narration-audio-from-text/

## How to run a local OpenAI-style audio API for an app with Speech CPP

Repo: [nyosegawa/speech.cpp](https://github.com/nyosegawa/speech.cpp) | Difficulty: Intermediate | Time: 45 minutes | Basis: From the README

Point an OpenAI audio client at a local speech server for speech and transcription.

**Who it is for:** A developer building a web app or script that already calls OpenAI's audio API and wants to keep audio processing on their own computer.

**The problem:** Audio requests to a hosted API send private audio off the machine and add per-call costs during development.

**The outcome:** Speech and transcription requests answered by a local server through the same API shape, using a changed base URL.

### Steps

1. Install speech using the installer for your platform.
2. Run `speech serve qwen3-tts-0.6b qwen3-asr-0.6b` to start the server.
3. Send a speech request with `curl http://127.0.0.1:8080/v1/audio/speech -H 'Content-Type: application/json' -d '{"input": "Hello.", "voice": "ryan"}' -o hello.wav`. (inferred, check the README)
4. Send a transcription with `curl http://127.0.0.1:8080/v1/audio/transcriptions -F file=@hello.wav`.

### Prompt to paste into your agent

```text
In the nyosegawa/speech.cpp repo, install speech, run `speech serve qwen3-tts-0.6b qwen3-asr-0.6b`, and then call the local POST /v1/audio/transcriptions endpoint on 127.0.0.1:8080 with a WAVE file at <path>. Expected output: a JSON or text transcript of the file. Verify that the text matches the audio.
```

### Caveat

The server listens on 127.0.0.1 and has no authentication, so do not expose it on a shared or public network.

Risk, remote script: The install step runs a script fetched from the internet, so review it before running.

Dual-use notice: only use this on software, sites and systems you own or are authorized to test.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/nyosegawa-speech-cpp/serve-openai-audio-api-on-localhost/

## How to keep speech models loaded in a worker process with Speech CPP

Repo: [nyosegawa/speech.cpp](https://github.com/nyosegawa/speech.cpp) | Difficulty: Advanced | Time: 60 minutes | Basis: From the README

Run a long-lived speech worker that a program talks to over JSON Lines.

**Who it is for:** A developer whose program makes many speech requests and needs the models to stay loaded between them, such as an ASIST-style tool.

**The problem:** Loading a model for every call wastes time, and linking a library may not fit the program's language.

**The outcome:** A worker process that answers one JSON Lines request per line on stdin with audio or text on stdout.

### Steps

1. Install speech using the installer for your platform.
2. Start the worker with `speech worker qwen3-asr-0.6b`, using the model name your program needs. (inferred, check the README)
3. Write one JSON request per line to the worker's stdin, following docs/worker.md in the repo.
4. Read the audio or text and the terminal message from stdout, and check that each request ends with its terminal message.

### Prompt to paste into your agent

```text
Using the nyosegawa/speech.cpp repo, install speech, start `speech worker <model-name>`, and send one JSON Lines request built from docs/worker.md for the input <path-to-wav>. Expected output: one line of text or audio followed by a terminal message on stdout. Verify that the terminal message arrives for every request you send.
```

### Caveat

The exact request fields are in docs/worker.md, which this summary does not reproduce, so read that page before writing a client.

Risk, remote script: The install step runs a script fetched from the internet, so review it before running.

Dual-use notice: only use this on software, sites and systems you own or are authorized to test.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/nyosegawa-speech-cpp/run-speech-worker-for-a-program/
