Skip to content

This project is divided into two parts: one runs on the user's machine, and the other runs in the cloud. The user can send audio from their microphone to the cloud machine, which transcribes the audio and returns the transcribed text.

License

Notifications You must be signed in to change notification settings

lunikdev/VozSync

Repository files navigation

VozSync

This project is divided into two parts: one running on the user's machine and the other that can run in the cloud or locally. The user can send audio from their microphone to the cloud-based machine, which transcribes the audio and returns the transcribed text.


Installation

To install the project, follow these steps:

  1. Create and activate a virtual environment:
python -m venv venv
  1. Activate the virtual environment:
.\venv\Scripts\activate

or on Linux/Mac:

source venv/bin/activate
  1. Install required packages:
pip install -r requirements.txt

Note: Installing dependencies without a virtual environment is not recommended.


Token System

To ensure secure communication between the client and server, the project uses a token-based authentication system. The token is stored in the .env file and is validated on both the server and client sides.

Generating and Updating the Token

A Python script (generate_token.py) is available to generate and update the token directly in the .env file. Run the following command:

python generate_token.py

This will generate a new token and automatically update it in the .env file.

Verifying the Token

The server and client validate the token during the connection. Ensure that the token in the .env file is the same on both sides.


CUDA Support

CPU support is native and requires no additional installation. However, if you want to accelerate processing using CUDA cores, you need to install the compatible version of PyTorch with CUDA. You can find the appropriate version for your system on the PyTorch Get Started page.

Installation Commands

Windows:

pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu124

Linux:

pip3 install torch torchvision torchaudio

Checking CUDA Version

Before installing PyTorch, you can verify your current CUDA version using the provided check_cuda_version.py script. Run the following command:

python check_cuda_version.py

This will help you determine the correct CUDA version to install from the PyTorch website.


Easy Setup (In Development)

We are developing an easy setup system to simplify project configuration for end users. This system will automate dependency installation, token configuration, and environment setup. Stay tuned for updates!


Usage Example

Server

To start the server, run:

python server.py

Client

To start the client, run:

python client.py

Client on Google Colab

To run the client on Google Colab, use the Whisper.ipynb script and follow the instructions in the notebook.


Redundancy Levels

The system supports different levels of redundancy to handle data transmission and processing based on your requirements.

  • Level 1: Single Client

    • Description: Data is sent to a single client.
    • Use Case: Suitable for environments where only one client is available or desired.
    • Configuration: Set redundancy_level to 1 in the configuration file.
  • Level 2: Full Redundancy

    • Description: Data is sent to all connected clients for redundancy.
    • Use Case: Ideal for ensuring data integrity by sending data to multiple clients.
    • Configuration: Set redundancy_level to 2 in the configuration file.
  • Level 3: Redundancy with Load Balancing

    • Description: Data is sent to clients in a round-robin fashion, balancing the load across multiple clients.
    • Use Case: Recommended for distributed systems where load balancing is necessary.
    • Configuration: Set redundancy_level to 3 in the configuration file.

Dependencies

This project uses Whisper from OpenAI, licensed under the MIT License.


License

This project is licensed under the MIT License.


Contact

Developed by Leandro Gonçalves. For more information:


This project is constantly evolving. Contributions and suggestions are welcome! 🚀


About

This project is divided into two parts: one runs on the user's machine, and the other runs in the cloud. The user can send audio from their microphone to the cloud machine, which transcribes the audio and returns the transcribed text.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published