blob: 54b16ebee3b3628f20801940221ab60a43ccd640 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
# Maintainer: Your Name <your@email.com>
pkgname=voice-input-steamdeck
pkgver=1.0.0
pkgrel=1
pkgdesc="Push-to-talk voice transcription for Steam Deck using Groq Whisper API"
arch=('any')
url="https://github.com/shmlkv/voice-input-steamdeck"
license=('MIT')
depends=(
'bash'
'curl'
'jq'
'xdotool'
'bc'
'python'
'pipewire-pulse'
'libnotify'
'xbindkeys'
)
optdepends=(
'alsa-utils: fallback audio recording with arecord'
)
install=${pkgname}.install
source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/v${pkgver}.tar.gz")
sha256sums=('d5558cd419c8d46bdc958064cb97f963d1ea793866414c025906ec15033512ed')
package() {
cd "${srcdir}/${pkgname}-${pkgver}"
# Install main script
install -Dm755 voice-input.sh "${pkgdir}/usr/bin/voice-input"
# Install toggle script
install -Dm755 /dev/stdin "${pkgdir}/usr/bin/voice-input-toggle" << 'EOF'
#!/bin/bash
export PATH="/usr/bin:${HOME}/.local/bin:${PATH}"
export DISPLAY="${DISPLAY:-:0}"
if [[ -f /tmp/voice-input/recording_state ]]; then
voice-input stop
else
voice-input start
fi
EOF
# Install desktop entry
install -Dm644 /dev/stdin "${pkgdir}/usr/share/applications/voice-input.desktop" << EOF
[Desktop Entry]
Name=Voice Input
Comment=Push-to-talk voice transcription for Steam Deck
Exec=voice-input-toggle
Icon=audio-input-microphone
Type=Application
Terminal=false
Categories=Utility;Audio;Accessibility;
Keywords=voice;speech;transcription;whisper;steamdeck;
EOF
# Install license
install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
# Install README
install -Dm644 README.md "${pkgdir}/usr/share/doc/${pkgname}/README.md"
}
|