Windows livekit
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:
- 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:
- Download the installation script from https://install.python-poetry.org/ and save it as install-poetry.py.
- 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()
- Run the modified script to install Poetry.
- Add Poetry’s bin directory to your PATH:
- Path: C:\Users[USERNAME]\AppData\Roaming\Python\Scripts
- Follow the guide at: https://www.java.com/en/download/help/path.html
LiveKit Server Installation:
- Download the latest release of LiveKit server for Windows (e.g., livekit_1.7.2_windows_amd64.zip).
- Extract the livekit-server.exe file to your /software directory.
FFmpeg Installation:
- 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.
- Extract the compressed zip and add the FFmpeg bin directory to your PATH.
Installation Steps:
-
Run ‘poetry install’. If you encounter an error about Microsoft Visual C++, install “Microsoft C++ Build Tools”:
- Download from: https://visualstudio.microsoft.com/visual-cpp-build-tools/
- In the installation popup, select “Desktop Development with C++” with preselected components.
-
Set up your Anthropic API key: setx ANTHROPIC_API_KEY [your_api_key]
-
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.