> ## Documentation Index
> Fetch the complete documentation index at: https://assemblyai.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Go from a microphone to a finished transcript in one HTTP call, with the upload happening while the person is still talking.

The Sync API turns up to 120 seconds of speech into one finished transcript, returned in the same HTTP call. No job to poll, no WebSocket to manage. This page gets you from a microphone to that transcript on the fastest path the API offers. The upload runs while the person is still speaking, so what you wait for at the end is only the last stretch of audio.

## Before you begin

* **An API key.** Copy it from [API Keys](https://www.assemblyai.com/dashboard/home) and set it once:

  ```bash theme={null}
  export ASSEMBLYAI_API_KEY=<your-key>
  ```

* **The SDK.**

  <Tabs groupId="language">
    <Tab language="python-sdk" title="Python" default>
      ```bash theme={null}
      pip install -U assemblyai sounddevice
      ```
    </Tab>

    <Tab language="javascript-sdk" title="JavaScript">
      ```bash theme={null}
      npm install assemblyai
      ```

      The JavaScript example records with [SoX](https://sourceforge.net/projects/sox/) (`brew install sox` or `apt install sox`).
    </Tab>
  </Tabs>

## Transcribe from a microphone

Open a session, hand it audio as you capture it, and read the result when the speaker stops.

<Tabs groupId="language">
  <Tab language="python-sdk" title="Python" default>
    ```python theme={null}
    import sounddevice as sd
    from assemblyai.sync.v1 import SyncTranscriber, SyncTranscriptionConfig

    RATE = 16000
    config = SyncTranscriptionConfig(sample_rate=RATE, channels=1)

    with SyncTranscriber() as transcriber:
        with transcriber.open_live(config) as session:
            microphone = sd.RawInputStream(
                samplerate=RATE, channels=1, dtype="int16",
                callback=lambda data, *_: session.write(bytes(data)),
            )
            with microphone:
                input("Speak, then press Enter... ")

        print(session.result().text)
    ```
  </Tab>

  <Tab language="javascript-sdk" title="JavaScript">
    ```javascript theme={null}
    import { spawn } from "node:child_process";
    import { AssemblyAI } from "assemblyai";

    const client = new AssemblyAI({ apiKey: process.env.ASSEMBLYAI_API_KEY });
    const RATE = 16000;

    const session = client.sync.openLive({ sample_rate: RATE, channels: 1 });

    // SoX writes raw 16-bit mono PCM to stdout while it records.
    const microphone = spawn("sox", [
      "--default-device", "--no-show-progress",
      "--rate", String(RATE), "--channels", "1",
      "--encoding", "signed-integer", "--bits", "16", "--type", "raw", "-",
    ]);
    microphone.stdout.on("data", (chunk) => session.write(chunk));
    microphone.stdout.on("end", () => session.close());

    console.log("Speak, then press Ctrl+C...");
    process.on("SIGINT", () => microphone.kill());

    const result = await session.result();
    console.log(result.text);
    ```
  </Tab>
</Tabs>

Run it, say a sentence, stop the recording. You'll see the transcript:

```text theme={null}
Hi, I'm calling about my Best Buy order...
```

The result also carries per-word confidence, the overall confidence, the audio duration, and a `session_id` to quote if you contact support. Microphone audio is raw PCM with no header, which is why the config names the sample rate and channel count.

## Where to next

* [Transcribe a short audio file](/docs/sync-stt/getting-started/transcribe-a-short-audio-file): audio you already have in full, plus every request option: model, language, word timestamps, raw PCM, and calling the API without an SDK.
* [Transcribe live audio](/docs/sync-stt/getting-started/transcribe-live-audio): hand `transcribe_live()` any source that produces audio over time, such as a call, a WebSocket, or an upload from a browser.
* [Connection pre-warming](/docs/sync-stt/connection-pre-warming): call `warm()` the moment you know audio is coming to take the handshake off the critical path.
* [API reference](/docs/api-reference/sync-api/transcribe-live): every header, part, and field.

## Need help?

Contact [support@assemblyai.com](mailto:support@assemblyai.com) or open a [support ticket](https://www.assemblyai.com/contact/support). Include the `session_id` from the response.
