Skip to content

Commit b9ae2af

Browse files
aaron-boxerboxerab
authored andcommitted
setup.sh: support Fedora
1 parent c6ee9a6 commit b9ae2af

File tree

2 files changed

+28
-6
lines changed

2 files changed

+28
-6
lines changed

README.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ input from microphone and pre-recorded audio files.
2525
- [Citations](#citations)
2626

2727
## Installation
28-
- Install PyAudio
28+
- Install PortAudio
2929
```bash
3030
bash scripts/setup.sh
3131
```
@@ -35,6 +35,16 @@ input from microphone and pre-recorded audio files.
3535
pip install whisper-live
3636
```
3737

38+
39+
- Install 3.12 venv on Fedora
40+
41+
```bash
42+
sudo dnf install -y python3.12 python3.12-pip
43+
python3.12 -m venv whisper_env
44+
source whisper_env/bin/activate
45+
```
46+
47+
3848
### Setting up NVIDIA/TensorRT-LLM for TensorRT backend
3949
- Please follow [TensorRT_whisper readme](https://github.com/collabora/WhisperLive/blob/main/TensorRT_whisper.md) for setup of [NVIDIA/TensorRT-LLM](https://github.com/NVIDIA/TensorRT-LLM) and for building Whisper-TensorRT engine.
4050

scripts/setup.sh

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#! /bin/bash
1+
#!/bin/bash
22

33
# Detect the operating system
44
if [[ "$OSTYPE" == "darwin"* ]]; then
@@ -13,8 +13,20 @@ if [[ "$OSTYPE" == "darwin"* ]]; then
1313

1414
# Install packages using Homebrew
1515
brew install portaudio wget
16+
elif [[ "$OSTYPE" == "linux-gnu"* ]]; then
17+
# Linux
18+
if [[ -f /etc/os-release ]]; then
19+
source /etc/os-release
20+
fi
21+
22+
if [[ "${ID:-}" == "fedora" ]]; then
23+
echo "Detected Fedora, using dnf for installation"
24+
dnf install -y portaudio-devel wget
25+
else
26+
echo "Detected Linux (assuming Debian/Ubuntu), using apt-get for installation"
27+
apt-get install -y portaudio19-dev wget
28+
fi
1629
else
17-
# Linux (Debian/Ubuntu)
18-
echo "Detected Linux, using apt-get for installation"
19-
apt-get install portaudio19-dev wget -y
20-
fi
30+
echo "Unsupported operating system: $OSTYPE"
31+
exit 1
32+
fi

0 commit comments

Comments
 (0)