Code Monkey home page Code Monkey logo

logseq-whisper-subtitles-server's Introduction

logseq-whisper-subtitles-server

English | 日本語

Overview

  • This server is designed to work in conjunction with the Logseq plugin called logseq-plugin-whisper-subtitles.
  • It's a local server designed to make requests to the Whisper service (processing server) installed locally on the PC and receive data from it.

    In addition to setting up the server, it's necessary to install its dependencies.

Dependencies

Please install both of the following:

  1. Python: Python is required for running the server.
    1. Python 3 Installation & Setup Guide
  2. ffmpeg: This is essential for running the Whisper service.
    1. Execute one of the following commands from the command prompt (terminal) or similar to install it. Whisper Setup Documentation
    # On macOS, use Homebrew (https://brew.sh/).
    brew install ffmpeg
    
    # On Windows, use Chocolatey (https://chocolatey.org/).
    choco install ffmpeg
    

Setup

Before setting up the dedicated server, ensure that the dependencies are installed.

  1. Clone the repository to the local PC.

    Create a new folder in a safe location and execute the following commands for that folder. On Windows 11, right-click the folder and open a terminal.

    git clone https://github.com/usoonees/logseq-whisper-subtitles-server.git
    cd logseq-whisper-subtitles-server
  2. Install Python packages.

    pip install git+https://github.com/openai/whisper.git 
    pip3 install flask pytube openai-whisper
  3. For the initial setup, test to ensure there are no issues with the dependencies and that Whisper is functioning correctly.

    cd logseq_whisper_subtitles_server
    python services.py
  4. If the results displayed in the command prompt resemble the following output, the setup is successful:

    Loading base whisper model...
    Loading base whisper model done.
    /Users/usoon/miniforge3/envs/test/lib/python3.9/site-packages/whisper/transcribe.py:114: UserWarning: FP16 is not supported on CPU; using FP32 instead
      warnings.warn("FP16 is not supported on CPU; using FP32 instead")
    00:00:00 --> 00:00:11
    When you hear the term artificial intelligence, what comes to mind?
    
    
    00:00:09 --> 00:00:13
    Superpowered robots?
    
    
    00:00:11 --> 00:00:18
    Hyperintelligent devices?
    
    
    00:00:13 --> 00:00:29
    Science fiction has familiarized the world with the concept, but outside of Hollywood, what is artificial intelligence and what can AI actually do?
    ....
    
  5. Once the setup is complete, proceed to start the dedicated server.

Starting the Server

To start the dedicated server, 2 options:

  1. Manually start the server:

    • Execute the following command for the folder named logseq_whisper_subtitles_server located inside the folder created during setup (logseq-whisper-subtitles-server).

      It's a bit confusing, but the folder structure is "logseq-whisper-subtitles-server > logseq_whisper_subtitles_server," and inside it, there's a Python executable called "app.py."

    1. Launch the dedicated app called "app.py" using Python.
      python3 app.py

      If encounter an error with "python3," "python" should work as well.

  2. Use a bash script (optional)

    bash run.sh

Make sure that the server is running if intend to use the dedicated plugin (logseq-plugin-whisper-subtitles) in Logseq.

Related Repository

  • logseq-plugin-whisper-subtitles - The Logseq plugin that interfaces with this server to extract subtitles and timestamp from videos.
  • whisper - The AI model used to extract voice from audio.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.