Skip to content

Commit 10b39f8

Browse files
author
opencode
committed
Merge branch 'main' of github.com:crhy/Voice2Text-AI
2 parents 06ddf80 + 3024345 commit 10b39f8

File tree

3 files changed

+140
-12
lines changed

3 files changed

+140
-12
lines changed

README.md

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,13 @@ Download the latest release from [GitHub Releases](https://github.com/crhy/Voice
3333

3434
### Linux (Flatpak)
3535
```bash
36+
# Install from Flathub (when available)
3637
flatpak install flathub com.voice2text.app
38+
39+
# Or download from GitHub Releases
40+
# Download: voice2text.flatpak from latest release
41+
# Install: flatpak install --user voice2text.flatpak
42+
# Run: flatpak run com.voice2text.app
3743
```
3844

3945
### From Source
@@ -56,7 +62,11 @@ python test_whisper.py
5662
pyinstaller voice_app.spec
5763

5864
# Build Flatpak
59-
flatpak-builder build com.voice2text.app.yml --force-clean
65+
flatpak-builder --force-clean build com.voice2text.app.yml
66+
flatpak-builder --user --install build com.voice2text.app.yml
67+
68+
# Export Flatpak for distribution
69+
flatpak build-bundle build voice2text.flatpak com.voice2text.app
6070
```
6171

6272
### Setup Ollama
@@ -124,6 +134,25 @@ Voice2Text-AI/
124134
└── README.md
125135
```
126136

137+
## Distribution
138+
139+
### Building Releases
140+
```bash
141+
# Create GitHub release with all platform binaries
142+
# Upload these files to GitHub Releases:
143+
# - Voice2Text.exe (Windows)
144+
# - Voice2Text (macOS)
145+
# - voice2text.flatpak (Linux)
146+
```
147+
148+
### Flathub Submission
149+
To submit to Flathub for official distribution:
150+
```bash
151+
# Fork the Flathub repository
152+
# Add your manifest to: https://github.com/flathub/flathub
153+
# Submit pull request with com.voice2text.app.yml
154+
```
155+
127156
## Contributing
128157

129158
Contributions welcome! Please submit issues and pull requests on [GitHub](https://github.com/crhy/Voice2Text-AI).

build_flatpak.sh

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
#!/bin/bash
2+
# Voice2Text AI - Flatpak Build and Release Script
3+
# Run this script to build and prepare the flatpak for distribution
4+
5+
set -e # Exit on any error
6+
7+
echo "🎯 Voice2Text AI - Flatpak Builder"
8+
echo "=================================="
9+
10+
# Colors for output
11+
RED='\033[0;31m'
12+
GREEN='\033[0;32m'
13+
YELLOW='\033[1;33m'
14+
NC='\033[0m' # No Color
15+
16+
# Function to print colored output
17+
print_status() {
18+
echo -e "${GREEN}$1${NC}"
19+
}
20+
21+
print_warning() {
22+
echo -e "${YELLOW}⚠️ $1${NC}"
23+
}
24+
25+
print_error() {
26+
echo -e "${RED}$1${NC}"
27+
}
28+
29+
# Check if we're in the right directory
30+
if [ ! -f "com.voice2text.app.yml" ]; then
31+
print_error "com.voice2text.app.yml not found. Please run this script from the Voice2Text-AI directory."
32+
exit 1
33+
fi
34+
35+
# Check if flatpak-builder is installed
36+
if ! command -v flatpak-builder &> /dev/null; then
37+
print_warning "flatpak-builder not found. Installing..."
38+
sudo apt update && sudo apt install -y flatpak-builder
39+
print_status "flatpak-builder installed"
40+
else
41+
print_status "flatpak-builder is available"
42+
fi
43+
44+
# Clean any previous builds
45+
print_status "Cleaning previous builds..."
46+
rm -rf build voice2text.flatpak
47+
48+
# Build the flatpak
49+
print_status "Building Flatpak (this may take several minutes)..."
50+
flatpak-builder --force-clean build com.voice2text.app.yml
51+
52+
# Create distributable bundle
53+
print_status "Creating distributable bundle..."
54+
flatpak build-bundle build voice2text.flatpak com.voice2text.app
55+
56+
# Verify the bundle was created
57+
if [ -f "voice2text.flatpak" ]; then
58+
BUNDLE_SIZE=$(du -h voice2text.flatpak | cut -f1)
59+
print_status "Flatpak bundle created: voice2text.flatpak (${BUNDLE_SIZE})"
60+
else
61+
print_error "Failed to create flatpak bundle"
62+
exit 1
63+
fi
64+
65+
# Test the bundle locally (optional)
66+
read -p "Do you want to test the flatpak locally? (y/n): " -n 1 -r
67+
echo
68+
if [[ $REPLY =~ ^[Yy]$ ]]; then
69+
print_status "Installing locally for testing..."
70+
flatpak-builder --user --install build com.voice2text.app.yml
71+
72+
print_status "Testing the app..."
73+
timeout 10s flatpak run com.voice2text.app || print_warning "App test completed (timeout expected)"
74+
fi
75+
76+
echo ""
77+
print_status "Flatpak build completed successfully!"
78+
echo ""
79+
echo "📦 Next steps:"
80+
echo "1. Create a new GitHub release at: https://github.com/crhy/Voice2Text-AI/releases"
81+
echo "2. Upload the file: voice2text.flatpak"
82+
echo "3. Tag: v0.3-flatpak"
83+
echo "4. Title: Voice2Text AI v0.3 - Linux Flatpak"
84+
echo "5. Description:"
85+
echo '```'
86+
echo "Linux Flatpak distribution of Voice2Text AI."
87+
echo ""
88+
echo "## Installation"
89+
echo '```bash'
90+
echo "# Download voice2text.flatpak from this release"
91+
echo "flatpak install --user voice2text.flatpak"
92+
echo "flatpak run com.voice2text.app"
93+
echo '```'
94+
echo '```'
95+
echo ""
96+
echo "6. Publish the release"
97+
echo "7. Share the download URL with the developer to update README.md"
98+
echo ""
99+
print_status "Build script completed! 🎉"

com.voice2text.app.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,20 @@ finish-args:
1010
- --device=all
1111
- --filesystem=home
1212
modules:
13-
- name: voice2text
14-
buildsystem: simple
15-
build-commands:
16-
- pip3 install --user -r requirements.txt --break-system-packages
17-
- mkdir -p /app/bin
18-
- cp voice_app.py /app/bin/
19-
- cp voice_config.json /app/bin/ || true
13+
- name: voice2text
14+
buildsystem: simple
15+
build-commands:
16+
- pip3 install --user -r requirements.txt --break-system-packages
17+
- mkdir -p /app/bin
18+
- cp voice_app.py /app/bin/
19+
- cp voice_config.json /app/bin/ || true
2020
sources:
2121
- type: git
2222
url: https://github.com/crhy/Voice2Text-AI.git
23-
tag: v0.2
24-
commit: 8fb243c
23+
tag: v0.3
24+
commit: 7f44a79
2525
- type: file
2626
path: logo.png
27-
post-install:
28-
- install -Dm644 voice_app.desktop /app/share/applications/com.voice2text.app.desktop
27+
post-install:
28+
- install -Dm644 voice_app.desktop /app/share/applications/com.voice2text.app.desktop
2929
- install -Dm644 logo.png /app/share/icons/hicolor/512x512/apps/com.voice2text.app.png

0 commit comments

Comments
 (0)