---
title: "Start a Voice AI App with npm create micdrop | Micdrop"
description: "Create a voice AI project in one command with npm create micdrop: Next.js, Vite and React, Expo, a phone agent or a Node server, with the AI providers you pick."
url: "https://micdrop.dev/docs/templates"
---

# Start a Voice AI App with npm create micdrop

One command writes a project that runs as it is: the client, the Node server that runs the AI, a `.env` to fill with your keys, and a README.

```bash
npm create micdrop@latest
```

It asks where to write the project, which template to start from and which AI runs the call, then offers to install the dependencies. With pnpm, Yarn or Bun:

```bash
pnpm create micdrop
yarn create micdrop
bun create micdrop
```

Fill the `.env` it wrote, then start the project with `npm run dev`.

## Templates

Template

What you get

Flag

Next.js

A Next.js page that holds the call, and a WebSocket server next to Next.js

`nextjs`

Vite + React

A React page built with Vite, a Fastify server, and Silero voice detection shipped with the app

`vite-react`

Expo

An iOS and Android app with React Native, and the server it talks to

`expo`

Phone agent

A phone number answered by the agent, through Twilio, Telnyx, Vonage or Plivo

`phone`

Node server

A WebSocket server alone, for any Micdrop client

`node`

Every template gives the assistant a first message and the [end call tool](/docs/server/auto-end-call), and keeps the AI providers in one file, `ai.ts`, so swapping one touches nothing else.

### Next.js

A call keeps a WebSocket open for its whole length, which the route handlers of Next.js do not hold, so the voice server runs as a Node process next to Next.js. `npm run dev` starts both. The page loads the call in the browser only, since it needs the microphone, and reads its state with the [React hooks](/docs/client/react-hooks).

### Vite + React

Vite hands `/call` to the Fastify server, so the page and the call share one address in development. The [Micdrop Vite plugin](/docs/client/installation#vite-plugin) ships the Silero model with the app, and the call combines the volume and Silero [voice detection](/docs/client/vad).

### Expo

The app runs from a development build, as any app that records audio natively. It finds the server on the machine Expo served it from, so a simulator and a phone on the same Wi-Fi work without configuration. The keys stay in `server/.env`, out of the app. See [React Native](/docs/react-native) for what the client does.

### Phone agent

The template answers a phone number on your own server. You pick the telephony provider when creating the project, and the generated `src/telephony.ts` answers its webhook and opens its media stream. The agent:

*   Greets the caller as soon as the call connects
*   Hangs up once the caller says goodbye
*   Transfers the caller to a person when `TRANSFER_NUMBER` is set, at once or after briefing them, through [`transferCallTool()`](/docs/transports/call-transfer)
*   Reads the keys pressed on the keypad, and checks in when the caller stays silent
*   Places calls with `POST /call` when `OUTBOUND_API_KEY` is set, and leaves a message when a voicemail picks up, as [outbound calls](/docs/transports/outbound-calls) explain
*   Refuses the webhooks your provider did not sign, unless `VERIFY_SIGNATURES=false`, as [securing the webhooks](/docs/transports/telephony#securing-the-webhooks) explains
*   Saves the audio and the transcript of each call when `RECORDINGS_DIR` is set, through the [recorder](/docs/server/recording-audio)
*   Logs the conversation once the call is over, ready to send to your CRM

The server finds the turns of the caller itself with Silero, since a phone line has no client to do it. See [Telephony](/docs/transports/telephony) for each provider, and [Migrate from Vapi](/docs/migration/from-vapi) to move an assistant from a hosted platform to this template.

### Node server

The smallest project: a WebSocket server that runs each connection as a call. Connect any client to it, [in a browser](/docs/client) or [on a phone](/docs/react-native).

## AI providers

A preset sets the three parts of a call at once:

Preset

What runs the call

Keys

`openai`

OpenAI speech to text, GPT and OpenAI voices

One

`openai-realtime`

The OpenAI Realtime API, one speech to speech model

One

`gemini-live`

Gemini Live, one speech to speech model

One

`grok-voice`

Grok Voice by xAI, one speech to speech model

One

`mistral`

Voxtral to transcribe and speak, Mistral Medium to answer

One

`europe`

Speechmatics, Mistral Medium and Gradium, on their EU endpoints

Three

`local`

Whisper, an Ollama model and Kokoro, on your machine

None

Or pick each part:

Part

Flag

Choices

Speech to text

`--stt`

`openai`, `gladia`, `mistral`, `gemini`, `deepgram`, `deepgram-flux`, `assemblyai`, `speechmatics`, `grok`, `whisper`

Agent

`--agent`

`openai`, `mistral`, `gemini`, `mastra`, `openai-agents`, `ollama`

Text to speech

`--tts`

`openai`, `elevenlabs`, `cartesia`, `mistral`, `gemini`, `deepgram`, `inworld`, `gradium`, `grok`, `kokoro`

Speech to speech

`--realtime`

`openai`, `gemini`, `grok`

The [local models](/docs/local-models) run on your machine with no key: pull the Ollama model before the first call. The `mastra` and `openai-agents` agents build a [Mastra](/docs/agents/mastra) or [OpenAI Agents SDK](/docs/agents/openai-agents) agent at the top of `ai.ts`, running an OpenAI model, ready to receive the tools, workflows or handoffs of your framework. Every other provider listed in [AI providers](/docs/providers) plugs into `ai.ts` the same way.

## Without questions

Every answer has a flag, so a script or a CI job creates a project without a prompt. Anything left out takes its default with `--yes`, or is asked.

```bash
npm create micdrop@latest my-agent -- --template phone --telephony twilio --ai openai --install
```

```bash
pnpm create micdrop my-app --template nextjs --stt gladia --agent mistral --tts elevenlabs
```

Flag

Values

`--template`, `-t`

`nextjs`, `vite-react`, `expo`, `phone`, `node`

`--ai`

`openai`, `openai-realtime`, `gemini-live`, `grok-voice`, `mistral`, `europe`, `local`

`--stt`, `--agent`, `--tts`

One part of the call, on top of a preset

`--realtime`

A speech to speech model, in place of the three parts

`--telephony`

`twilio`, `telnyx`, `vonage`, `plivo`, for the phone template

`--pm`

`npm`, `pnpm`, `yarn`, `bun`, the one running the command by default

`--install`, `--no-install`

Installs the dependencies, or leaves it to you

`--yes`, `-y`

Takes the defaults instead of asking

npm passes flags to the command after `--`, as in the first example. pnpm, Yarn and Bun need no separator.

## Build it with a coding agent

To vibe code your Micdrop implementation faster with Cursor, Claude Code or any other agent, [install Context7 MCP](https://github.com/upstash/context7).

Once the MCP is installed, you can prompt like this:

```
create a turbo monorepo in current folder with a client and a server in a new /apps folder:
- server: a simple fastify server with Typescript that implements a micdrop server (use context7)
- client: a simple React webapp with micdrop client. show play/stop/pause buttons and conversation, no other UI. make it beautiful and futuristic.
```
