---
title: "Add voice search"
description: "Send a spoken request and show its transcript with the matching passages."
generated: true
---

# Add voice search

`POST /v1/voice-search` takes a spoken request of up to 30 seconds (and 10 MB) as the request body, with its type, and returns what was heard and the same results as a search.

```
curl https://play.fellowverse.app/v1/voice-search \
  -H "Authorization: Bearer $KEY" -H 'content-type: audio/webm' \
  --data-binary @request.webm
```

The response is a search response with `"transcript"` added. MP3, WAV, M4A, OGG, WebM and FLAC are read. The audio is not kept. Billed per second of audio.

## Record and send from your app

Record the request in the app, send the audio to your server, and pass it to `POST /v1/voice-search` as the request body with its type. On Android, `MediaRecorder` with `OutputFormat.MPEG_4` and `AudioEncoder.AAC` gives `audio/mp4`; in a browser, `MediaRecorder` gives `audio/webm` or `audio/mp4`. MP3, WAV, OGG and FLAC work too.

```
curl 'https://play.fellowverse.app/v1/voice-search?limit=5' \
  -H "Authorization: Bearer $KEY" -H 'content-type: audio/mp4' \
  --data-binary @request.m4a
```

Show `transcript` back to the person, so they can see what was heard, with the results under it. When `transcript` is empty, nothing could be heard: ask them to try again closer to the microphone. Keep requests to a short spoken phrase; up to 30 seconds is read.

See the [voice-search endpoint](/api/voice-search).
