Skip to main content

SpeechInterface

Python 3.6 Hits

A Speech Interface Toolkit for Neural Speech Synthesis with Pytorch

This repository is made for deploying your neural speech synthesis experiments efficiently. The main feature is defined as:

  • Matching audio feature parameters and their source codes for using major neural vocoders

  • They called an interface, which has encode and decode function.

    • Encode: Convert raw waveform to audio features. (e.g. mel-spectrogram, mfcc ...)

    • Decode: Reconstruct audio features to raw waveform. (i.e. neural vocoder)

  • Usage Examples
    • Compare experimental results of neural vocoder with others
    • Use directly audio features and neural vocoders for neural speech synthesis models

Install

$ pip install speech_interface

Available neural vocoders

  1. Hifi-GAN (Universal v1, VCTK, LJSpeech) : speech_interface.interfaces.hifi_gan.InterfaceHifiGAN
  2. MelGAN (Multi Speaker and LJSpeech from official repository) : speech_interface.interfaces.mel_gan.InterfaceMelGAN
  3. WaveGlow (LJSpeech) (Universal will be added after solving import error) : speech_interface.interfaces.waveglow.InterfaceWaveGlow
  4. Multi-band MelGAN (VCTK, LJSpeech) : speech_interface.interfaces.multiband_mel_gan.InterfaceMultibandMelGAN

Example

  • Use an interface
import librosa
import torch
from speech_interface.interfaces.hifi_gan import InterfaceHifiGAN

# Make an interface
model_name = 'hifi_gan_v1_universal' 
device = 'cuda'
interface = InterfaceHifiGAN(model_name=model_name, device=device)

wav, sr = librosa.load('/your/wav/form/file/path')

# to pytorch tensor
wav_tensor = torch.from_numpy(wav).unsqueeze(0)  # (1, Tw)

# encode waveform tensor
features = interface.encode(wav_tensor)

# your speech synthesis process ...
# ...

# reconstruct waveform
pred_wav_tensor = interface.decode(features)
  • Checkout available models and audio parameters
from speech_interface.interfaces.hifi_gan import InterfaceHifiGAN

# available models
print(InterfaceHifiGAN.available_models())

# audio parameters
print(InterfaceHifiGAN.audio_params())

Reference

License

This repository is under MIT license.

Metadata

Release files for speech-interface 0.0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for speech-interface 0.0.2.1
File Size Uploaded Provenance Actions
speech_interface-0.0.2.1.tar.gz 14.6 kB Without provenance Details for speech_interface-0.0.2.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for speech-interface 0.0.2.1
File Interpreter ABI Platform Actions
speech_interface-0.0.2.1-py3-none-any.whl Python 3 none any Details for speech_interface-0.0.2.1-py3-none-any.whl

Total release size: 33.4 kB

Release files / speech_interface-0.0.2.1.tar.gz

Download URL speech_interface-0.0.2.1.tar.gz
Size 14.6 kB
Tags Source
SHA-256 checksum
How to use checksums
d0d1fb4217af3c072015a14658f010dd428ce93a4cedc49d62466d78a1ff1e13
BLAKE2b-256 checksum
How to use checksums
bfb37f09a63e0e3bdb6297a10f4ec9db80a58fde9807c7fd05acbd872cedd8f1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.23.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.7

Release files / speech_interface-0.0.2.1-py3-none-any.whl

Download URL speech_interface-0.0.2.1-py3-none-any.whl
Size 18.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
451558d6aebbbfe765194ed42e9a1b1a5510056dadb869bf1423301c86f40a06
BLAKE2b-256 checksum
How to use checksums
250db5723c7550d05e6cd48e5b3fb100efbb47cc5b78ec81d774e30cdf4dcc1c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.23.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.7

Security for speech-interface 0.0.2.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page