Local API for File Transcription and Backlog Management
Description
Complete Local API implementation with HTTP endpoints for automating file transcriptions and backlog management. Includes security features, VTT export, and comprehensive backlog UI.
Type of Change
- [ ] 🐞 Bug fix (non-breaking change which fixes an issue)
- [x] ✨ New feature (non-breaking change which adds functionality)
- [ ] 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [x] 📝 Documentation update
Related Issues
Closes #141
Testing
- [x] Tested on Apple Silicon Mac
- [x] Tested on macOS 14.0+ (Sonoma)
- [x] Ran linter locally:
swiftlint --strict --config .swiftlint.yml - [x] Ran formatter locally:
swiftformat --config .swiftformat Sources
Features Included
Local API
- HTTP Server: Local API server for automation
- File Transcription: POST /transcribe endpoint for file uploads
- Model Management: GET /models endpoint to list available models
- Status Checking: GET /jobs/:id for transcription job status
- Result Retrieval: GET /jobs/:id/result for completed transcriptions
Security
- Localhost binding: API only accessible from local machine
- Custom port: Configurable port (default: 9877)
- No authentication required for local-only access
Backlog Management
- Backlog UI: View and manage all transcription jobs
- Job Status: Track pending, processing, completed, and failed jobs
- Clear Options: Clear completed, failed, or all jobs
- VTT Export: Export transcriptions as WebVTT subtitles
Technical Implementation
- APIService: Core HTTP server with Swifter framework
- BacklogManager: Job queue management and processing
- Persistent storage: Jobs saved across app restarts
- File logger integration: Debug logging for troubleshooting
Files Changed
-
New Files:
Sources/Fluid/Services/APIService.swift- HTTP server implementationSources/Fluid/Services/BacklogManager.swift- Job queue management
-
Modified Files:
ContentView.swift- Added backlog UI integrationSettingsStore.swift- API settings (port, enable/disable)SettingsView.swift- API configuration UIAppDelegate.swift- API server initializationFileLogger.swift- Enhanced logging with print statementPackage.swift- Added Swifter dependencyInfo.plist- Version bump to 1.6.0
Co-Authored-By: Warp [email protected]
Thanks a lot for this PR. Sorry for being here late. Lot of work and backlogs for FV as well in general. Will take a look at it soon :) Did you try this for a bit ? I don't use this much - so I cannot test it that much so need help with testing too. Thanks man
Have it running on a local build since building it. No issue or crash so far.
I didn't want to add this big change yet along as we're trying to stabilize the app overall. Hopefully we can come back to this soon. sorry for the delay. Definitely a useful PR overall.
Resolving this since we have a flavor of this in the repo, @LagaV if you'd like to extend that please open a discussion, we can discuss and you can open a new PR. Thanks and sorry we never got back to you