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 details)

Uploaded Source

File details

Details for the file voice_analyzer-1.0.0.tar.gz.

File metadata

  • Download URL: voice_analyzer-1.0.0.tar.gz
  • Upload date:
  • Size: 5.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.7

File hashes

Hashes for voice_analyzer-1.0.0.tar.gz
Algorithm Hash digest
SHA256 fbe45da3a036cf3450d00b69c8d77f2ba95bf6338038d91239829e7fc7fc102b
MD5 6bcae92e505047de181d30a94909ff4d
BLAKE2b-256 5c0d7385abefcf67105f0af70fd9f989eb59a4d552620486128e512dbd2a730c

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