Skip to main content

Speechless repo for sales call analysis

Project description

speechless

UV Installation Instructions

To install dependencies and manage the project, we use uv, a fast Python package manager and resolver. Follow the steps below to set up your environment.

Step 1: Install uv

You can install uv via pip:

pip install uv

Or with pipx:

pipx install uv

Verify the installation:

uv --version

Step 2: Create a Virtual Environment (Optional but Recommended)

You can let uv manage the environment for you:

uv venv
source .venv/bin/activate

If you're using your own virtual environment tool (like venv or virtualenv), just activate it before proceeding.

Step 3: Install Dependencies

uv installs packages directly from pyproject.toml. To install all main and development dependencies:

uv pip compile pyproject.toml --output-file uv.lock
uv pip install --requirements uv.lock

Step 4: Run the Project or Tests

To activate the environment:

source .venv/bin/activate

To run the tests:

pytest

Step 5: Convert the model to ONNX format

To convert the model to ONNX format, run:

python export_to_onnx.py --checkpoint /path/to/checkpoint --onnx_model /path/to/onnx_model

Step 6: Add OPENAI_API_KEY and/or Set Up WHISPER_CPP_MODEL

The whisper_1 model requires an OpenAI subscription. As an alternative, you can use whisper.cpp.

To download a supported model:

# Linux
docker run -it --rm -v ./data/models:/models ghcr.io/ggerganov/whisper.cpp:main "./models/download-ggml-model.sh small /models"

# Windows (PowerShell)
docker run -it --rm -v "$(pwd -W)/models":/models ghcr.io/ggerganov/whisper.cpp:main "./models/download-ggml-model.sh small /models"

Once WHISPER_CPP_MODEL is set, inference is handled locally:

ffmpeg -i data/temp_results/uploaded_audio.mp3 -ar 16000 -ac 1 -c:a pcm_s16le data/audio/output.wav

Run whisper.cpp:

# Linux
docker run -it --rm -v ./data/models:/models -v ./data/audio:/audios ghcr.io/ggerganov/whisper.cpp:main "./build/bin/whisper-cli -m /models/ggml-small.bin -f /audios/output.wav -ml 16 -oj -l en"

# Windows
docker run -it --rm -v "$(pwd -W)/data/models":/models -v "$(pwd -W)/data":/audios ghcr.io/ggerganov/whisper.cpp:main "./build/bin/whisper-cli -m /models/ggml-small.bin -f /audios/output.wav -ml 16 -oj -l en"

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

o2_speechless-0.0.1.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

o2_speechless-0.0.1-py3-none-any.whl (3.1 kB view details)

Uploaded Python 3

File details

Details for the file o2_speechless-0.0.1.tar.gz.

File metadata

  • Download URL: o2_speechless-0.0.1.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.17

File hashes

Hashes for o2_speechless-0.0.1.tar.gz
Algorithm Hash digest
SHA256 9674627dec0621e9f655dc9d1848a19f6a06cb76cc913233c870e4108c89a453
MD5 a46c936e90f86d181d11c807de468ae9
BLAKE2b-256 a718b5d7b021ff9d3af5b874199f8eadcc9572fb1808eaba8eb26a810335899a

See more details on using hashes here.

File details

Details for the file o2_speechless-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for o2_speechless-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 dd7ed57261b454de72b60df685fcbed1c6306dfa310f8f52ae87bd3425969baf
MD5 652bbe7f7a886b2fea627374aa57cca1
BLAKE2b-256 ede910b7169af5f724008e6d2ea103890e0f67010a49d6d9ba4b14d52736621a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page