LiveKit Installation and Usage Guide for Windows

Prerequisites

Required Software:

  • IDE (e.g., VSCode, Cursor)
  • Git
  • Python (version 3.11.9 recommended)
  • Poetry (Python package manager)
  • LiveKit server for Windows
  • FFmpeg

Python Installation:

  1. Install Python 3.11.9 (latest version [less than] 3.12) using the binary installer.

Poetry Installation: Poetry installation on Windows can be challenging. If you encounter SSL certificate verification issues, try the following workaround:

  1. Download the installation script from https://install.python-poetry.org/ and save it as install-poetry.py.
  2. Modify the get(self, url): method in the script to disable certificate verification:

def get(self, url): import ssl import certifi request = Request(url) context = ssl.create_default_context(cafile=certifi.where()) context.check_hostname = False context.verify_mode = ssl.CERT_NONE with closing(urlopen(request, context=context)) as r: return r.read()

  1. Run the modified script to install Poetry.
  2. Add Poetry’s bin directory to your PATH:

LiveKit Server Installation:

  1. Download the latest release of LiveKit server for Windows (e.g., livekit_1.7.2_windows_amd64.zip).
  2. Extract the livekit-server.exe file to your /software directory.

FFmpeg Installation:

  1. Download the FFmpeg Windows build from: https://github.com/BtbN/FFmpeg-Builds/releases
    • Choose the ffmpeg-master-latest-win64-gpl.zip (non-shared suffix) version.
  2. Extract the compressed zip and add the FFmpeg bin directory to your PATH.

Installation Steps:

  1. Run ‘poetry install’. If you encounter an error about Microsoft Visual C++, install “Microsoft C++ Build Tools”:

  2. Set up your Anthropic API key: setx ANTHROPIC_API_KEY [your_api_key]

  3. Modify main.py to correctly locate and run the LiveKit server:

    • Set the LiveKit path: livekit_path = “path/to/your/01/software/livekit-server”
    • Modify the server command for Windows: f” —dev —bind —port ” Note: Remove the ’> /dev/null 2>&1’ section from the command as it’s not compatible with Windows.

Troubleshooting:

  • If you encounter “ffmpeg not found” errors or issues when sending messages, ensure FFmpeg is correctly installed and added to your PATH.
  • For any SSL certificate issues during installation, refer to the Poetry installation workaround provided above.

Additional Notes:

  • This guide assumes you’re using Windows. Some commands or paths may need to be adjusted for your specific setup.
  • Always ensure you’re using the latest versions of software and check official documentation for any recent changes.