Skip to main content

Human voice analyzer

Project description

Voice-analyzer

Human voice analyzer for determining human parameters.

Requirements

  • python 3.7 x64
  • pip (for installation)

Installation

$ pip install voice-analyzer

Usage

Import

from voice_analyzer import *

Sex

To determine sex, a ml model trained on the basis of voice frequency is used. The success rate is ~87%.

va_sex = analyzer.Sex()

You can use your own model.

va_sex = analyzer.Sex("path\\to\\model.h5")

Prediction

va_sex.predict("path\\to\\file.mp3")

The function returns the gender as a string:

  • male (0)
  • female (1)

Train

You can train the model based on your own dataset.

from voice_analyzer import *
import pandas as pd

va_sex = analyzer.Sex()
data = [
    {'sex': 0, 'frequency': 180},
    {'sex': 1, 'frequency': 220}
]
df = pd.DataFrame(data)

va_sex.train(df, "path\\to\\save\\model.h5")

Tests

You can check the percent accuracy of the model on your dataset.

from voice_analyzer import *
import pandas as pd

va_sex = analyzer.Sex()
data = [
    {'sex': 0, 'frequency': 180},
    {'sex': 1, 'frequency': 220}
]
df = pd.DataFrame(data)

va_sex.tests(df)

Project details


Download files

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

Files for voice-analyzer, version 1.0.0
Filename, size File type Python version Upload date Hashes
Filename, size voice_analyzer-1.0.0.tar.gz (5.1 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page