Skip to content

RheuX/VoiceToNote

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

VoiceToNote – LemonFox Whisper Transcription Tool

This repository provides two options for transcribing audio using the LemonFox Whisper OpenAI API:

  1. Legacy Desktop App (legacy/ folder)
    For small files — a GUI app built with PyQt5 and direct API calls.

  2. Callback-based Flask Server (in server/, suitable for deployment on cPanel or any WSGI server)
    For large files — uses a callback endpoint so LemonFox can notify when transcription is ready. A web dashboard displays results and lets you download .txt files.


🚀 Live Demo

image


Local Setup (Python 3.10+)

# 1. Create and activate a virtual environment
python -m venv myenv
source myenv/Scripts/activate  # On Windows use: .\myenv\Scripts\activate

# 2. Install dependencies
pip install -r requirements.txt

# Or install manually

# Server dependencies
pip install flask jinja2 python-dotenv

# Application dependencies
pip install PyQt5 ffmpeg-python requests-toolbelt

Project Structure

.
├── server/
│   ├── callback_server.py       # Flask server logic (WSGI-compatible)
│   ├── templates/
│   │   └── dashboard.html       # Jinja2 template for web UI
│   └── __init__.py              # optional, for modularization
├── app.wsgi                     # WSGI entry point for cPanel
├── legacy/
│   └── ...                      # PyQt5 desktop app
├── requirements.txt
└── README.md

How the Callback Server Works

  1. Upload your audio using the desktop app or directly via API.
  2. LemonFox processes it asynchronously and sends a callback to:
    https://yourdomain.com/callback
  3. Your Flask server receives the callback and stores the transcription in memory.
  4. You can view and download the result from the web dashboard as a .txt file.

Environment Variables

Create a .env file (excluded from repo) and include:

LEMONFOX_API_KEY=your-key-here
CALLBACK_URL=https://your-deployed-server-url/callback

🌐 Running the Server

🔹 Option 1: cPanel Deployment (WSGI)

To deploy the Flask callback server on cPanel:

1. Modify callback_server.py

Make sure it ends with:

application = app  # Required for WSGI

Remove or comment out app.run(...) if present.

2. Create app.wsgi in the root or server folder

import sys
sys.path.insert(0, "/home/your_cpanel_user/VoiceToNote/server")  # Adjust this path

from callback_server import application
  1. Go to "Setup Python App"
  2. Choose a Python version (e.g., 3.11+)
  3. Set the Application Root to VoiceToNote/server
  4. Set Application Startup File to callback_server.py
  5. Set the Entry Point to application
  6. Click Create Application
  7. Open the terminal from cPanel and run: pip install -r requirements.txt

Option 2: Render Deployment (ASGI)

  • The current server uses Flask (WSGI). If you'd like to deploy with FastAPI (ASGI) instead, feel free to reach out for help with refactoring.
  • Give Render access to the current github repository.
  • Match up the build deployment of render with this:
services:
  - type: web
    name: voice-to-note-fastapi
    env: python
    buildCommand: pip install -r requirements.txt
    startCommand: uvicorn callback_server:app --host 0.0.0.0 --port 10000
    plan: free
    envVars:
      - key: LEMONFOX_API_KEY
        value: your-api-key-here
      - key: CALLBACK_URL
        value: https://your-render-url/callback

Notes

  • The desktop app is for smaller audio files and quick tests
  • The server is ideal for longer recordings via asynchronous callback
  • All transcriptions are downloadable as .txt files via the dashboard

📄 License

This project is licensed under the MIT License. See LICENSE for details.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors