FluidVoice icon indicating copy to clipboard operation
FluidVoice copied to clipboard

Local API for File Transcription and Backlog Management

Open LagaV opened this issue 9 months ago • 3 comments

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 implementation
    • Sources/Fluid/Services/BacklogManager.swift - Job queue management
  • Modified Files:

    • ContentView.swift - Added backlog UI integration
    • SettingsStore.swift - API settings (port, enable/disable)
    • SettingsView.swift - API configuration UI
    • AppDelegate.swift - API server initialization
    • FileLogger.swift - Enhanced logging with print statement
    • Package.swift - Added Swifter dependency
    • Info.plist - Version bump to 1.6.0

Co-Authored-By: Warp [email protected]

LagaV avatar Feb 21 '26 19:02 LagaV

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

altic-dev avatar Mar 15 '26 19:03 altic-dev

Have it running on a local build since building it. No issue or crash so far.

LagaV avatar Mar 15 '26 20:03 LagaV

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.

altic-dev avatar Apr 02 '26 04:04 altic-dev

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

grohith327 avatar Jul 10 '26 02:07 grohith327