Skip to main content

Speechless repo for sales call analysis

Project description

miya-speechless

Poetry Installation Instructions

To install the dependencies and manage the project, we use Poetry. Follow the steps below to set up your environment with Poetry.

Step 1: Install Poetry

You can install Poetry by running the official installation script:

curl -sSL https://install.python-poetry.org | python3 -

Alternatively, you can install it via pip:

pip install poetry

Step 2: Verify Poetry Installation

After installing, verify that Poetry is available by running:

poetry --version

Step 3: Install Dependencies

Once Poetry is installed, you can install the project dependencies by running the following command in the project root:

poetry install

This will create a virtual environment and install all dependencies specified in the pyproject.toml file.

For Poetry >= 2.0.0, add poetry shell plugin, based on how you have installed Poetry, choose one of:

poetry self add poetry-plugin-shell
pipx inject poetry poetry-plugin-shell
pip install poetry-plugin-shell

Step 4: Run the Project or Tests

You can now run the project or the tests using the Poetry environment:

To activate the Poetry environment:

poetry shell

To run the tests:

poetry run pytest

Step 4: Convert the model to onnx format

To convert the model to onnx format, run the following command:

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

Step 5: Run the streamlit app

Place the onnx model in the models directory.

To start the streamlit app, run the following command:

poetry run streamlit run app/app.py

To start debug mode, run:

poetry run python -m debugpy --listen 5678 -m streamlit run app/app.py

In the application, you can set the following parameters:

  • overlap: Set the overlap between the transcript and the diaretization (default: 0.1)
  • onset_threshold: Set the onset threshold for speaker start (default: 0.1)
  • offset_threshold: Set the offset threshold for speaker stop (default: 0.1)

Step 6: Add OPENAI_API_KEY and/or setup WHISPER_CPP_MODEL

whisper_1 requires paid OpenAI subscription. An alternative is whisper.cpp

Download at least one of supported models:

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

When WHISPER_CPP_MODEL set, expect following to happen instead of calling OpenAI:

ffmpeg -i data/temp_results/uploaded_audio.mp3 -ar 16000 -ac 1 -c:a pcm_s16le data/audio/output.wav
# 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

miya_speechless-0.0.25.tar.gz (131.2 kB view details)

Uploaded Source

Built Distribution

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

miya_speechless-0.0.25-py3-none-any.whl (24.3 kB view details)

Uploaded Python 3

File details

Details for the file miya_speechless-0.0.25.tar.gz.

File metadata

  • Download URL: miya_speechless-0.0.25.tar.gz
  • Upload date:
  • Size: 131.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.20

File hashes

Hashes for miya_speechless-0.0.25.tar.gz
Algorithm Hash digest
SHA256 49c67d33916c0204bd60e39e660f3eb8ed5e5aee3ccda333255297d3b75178d7
MD5 7e0fbc2d8e5fccdc243df2407a65f1ed
BLAKE2b-256 7d88b8609ef1207f51d266b8ecfb5d2cfab4de206cfe76e2ea987dabb4fde242

See more details on using hashes here.

File details

Details for the file miya_speechless-0.0.25-py3-none-any.whl.

File metadata

File hashes

Hashes for miya_speechless-0.0.25-py3-none-any.whl
Algorithm Hash digest
SHA256 29caca927700790c7d0ae9c4605ad393f69e62bf7f381d3a168b7da261d6adb9
MD5 abd730a766d4445799ffcc38f64d5e21
BLAKE2b-256 7e1e5f55fbde2a29bcc4fdf9045d2fc032c7d24e8cce0ff66b586b7cf44c3509

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