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.

Source Distribution

voice_analyzer-1.0.0.tar.gz (5.1 kB view hashes)

Uploaded Source

Supported by

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