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

# Recipes

> Use the CLI in scripts, pipes, batch generation, and expressive audio workflows.

<AccordionGroup>
  <Accordion title="Read text from a file">
    ```bash theme={null}
    cast "$(cat script.txt)"
    ```
  </Accordion>

  <Accordion title="Pipe from another command">
    ```bash theme={null}
    echo "System is ready." | cast
    cast "$(curl -s https://example.com/status.txt)"
    ```
  </Accordion>

  <Accordion title="Batch generate audio files">
    ```bash theme={null}
    cast "Chapter one." --out ch1.wav
    cast "Chapter two." --out ch2.wav
    cast "Chapter three." --out ch3.wav
    ```
  </Accordion>

  <Accordion title="Generate captions for a short video">
    ```bash theme={null}
    cast "$(cat shorts-script.txt)" \
      --out shorts-voiceover.wav \
      --timestamps-out shorts-voiceover.srt
    ```
  </Accordion>

  <Accordion title="Generate WebVTT for a web preview">
    ```bash theme={null}
    cast "$(cat preview-script.txt)" \
      --out preview.wav \
      --timestamps-out preview.vtt \
      --timestamps-format vtt
    ```
  </Accordion>

  <Accordion title="Use a cloned voice for a draft">
    ```bash theme={null}
    voice_id=$(cast voices clone sample.wav --name "Draft Voice")
    cast "$(cat narration.txt)" --voice-id "$voice_id" --out draft.wav
    cast voices delete "$voice_id"
    ```
  </Accordion>

  <Accordion title="Audiobook with emotion">
    ```bash theme={null}
    cast "It was a dark and stormy night." \
      --emotion preset --emotion-preset normal --emotion-intensity 0.5 --out intro.wav

    cast "She opened the letter and gasped." \
      --emotion preset --emotion-preset happy --emotion-intensity 1.5 --out climax.wav

    cast "He watched the train disappear into the fog." \
      --emotion preset --emotion-preset sad --out farewell.wav
    ```
  </Accordion>

  <Accordion title="Smart emotion for natural delivery">
    ```bash theme={null}
    cast "I can't believe we actually made it!" --emotion smart \
      --prev-text "We've been working on this for three years." \
      --next-text "Let's celebrate tonight!"
    ```
  </Accordion>

  <Accordion title="Reproducible output with a fixed seed">
    ```bash theme={null}
    cast "Hello, world!" --seed 42 --out hello.wav
    cast "Hello, world!" --seed 42 --out hello2.wav
    ```
  </Accordion>

  <Accordion title="Use a different language">
    ```bash theme={null}
    cast "Bonjour le monde" --language fra
    cast "Hola mundo" --language spa
    ```
  </Accordion>

  <Accordion title="Adjust delivery style">
    ```bash theme={null}
    cast "Buy now, limited time offer!" --tempo 1.3 --pitch 2
    cast "Relax and take a deep breath." --tempo 0.85 --volume 90
    ```
  </Accordion>
</AccordionGroup>
