Skip to main content

PyVoiceCraft

PyVoiceCraft is an advanced voice processing package that provides comprehensive text-to-speech (TTS) and speech recognition capabilities with 100% more functionalities than existing packages.

Features

  • 🎤 Advanced Speech Recognition - Multiple engine support with continuous listening
  • 🔊 Text-to-Speech - High-quality voice synthesis with customizable profiles
  • 👤 Voice Profiles - Personalized voice settings (male/female, pitch, speed)
  • 🎵 Audio Processing - Pitch modification, speed control, echo effects, volume normalization
  • 💬 Voice Commands - Command processing and execution system
  • 📝 Conversation History - SQLite-based conversation tracking
  • 🎯 Custom Dictionary - Add custom word pronunciations
  • 📊 Voice Memos - Record and save audio memos
  • 📈 Usage Statistics - Track voice usage patterns
  • 🔄 Async Support - Non-blocking voice operations

Installation

pip install pyvoicecraft

Dependencies

PyVoiceCraft requires the following packages:

  • pyttsx3>=2.90 - Text-to-speech engine
  • SpeechRecognition>=3.8.1 - Speech recognition
  • PyAudio>=0.2.11 - Audio processing
  • numpy>=1.19.0 - Numerical operations
  • scipy>=1.5.0 - Scientific computing

Quick Start

Basic Text-to-Speech

from pyvoicecraft import speak

# Simple text-to-speech
speak("Hello, welcome to PyVoiceCraft!")

# With different voice
speak("This is a male voice", voice="male")
speak("This is a female voice", voice="female")

Voice Recognition

from pyvoicecraft import listen

# Listen for voice input
text = listen(timeout=5)
print(f"You said: {text}")

Advanced Usage

from pyvoicecraft import PyVoiceCraft

# Create instance
ps = PyVoiceCraft()

# Set voice profile
ps.set_profile("female")

# Speak with custom settings
ps.speak("Hello world!", save_to_file="greeting.wav")

# Start conversation
def handle_response(text):
    return f"You said: {text}"

ps.start_conversation(callback=handle_response)

Voice Profiles

from pyvoicecraft import PyVoiceCraft, VoiceProfile

ps = PyVoiceCraft()

# Create custom profile
custom_profile = VoiceProfile(
    name="assistant",
    gender="female",
    age=25,
    accent="neutral",
    pitch=1.1,
    speed=1.2
)

ps.add_profile(custom_profile)
ps.set_profile("assistant")
ps.speak("Hello with custom voice profile!")

Voice Commands

from pyvoicecraft import PyVoiceCraft

ps = PyVoiceCraft()

# Add voice commands
def time_command(text):
    ps.speak_time()

def date_command(text):
    ps.speak_date()

ps.commands.add_command("time", time_command, ["what time", "current time"])
ps.commands.add_command("date", date_command, ["what date", "today"])

# Start listening for commands
ps.commands.start_listening()

Audio Effects

from pyvoicecraft import PyVoiceCraft

ps = PyVoiceCraft()

# Apply audio effects
effects = {
    "echo": {"delay_ms": 500, "decay": 0.3},
    "pitch": {"factor": 1.2},
    "speed": {"factor": 0.9}
}

ps.speak("This text has audio effects", effects=effects)

API Reference

Main Classes

  • PyVoiceCraft - Main class with all functionalities
  • VoiceProfile - Voice profile management
  • VoiceRecognizer - Speech recognition handling
  • VoiceCommands - Command processing
  • AudioProcessor - Audio effects and processing

Quick Functions

  • speak(text, voice="female", **kwargs) - Quick text-to-speech
  • listen(timeout=5, language="en-US") - Quick voice recognition
  • create_male_voice() - Create male voice instance
  • create_female_voice() - Create female voice instance
  • get_available_voices() - List system voices

Examples

Voice Memo Recording

from pyvoicecraft import PyVoiceCraft

ps = PyVoiceCraft()
memo_path = ps.create_voice_memo(duration=10)
print(f"Voice memo saved to: {memo_path}")

Custom Word Pronunciation

from pyvoicecraft import PyVoiceCraft

ps = PyVoiceCraft()

# Add custom pronunciations
ps.add_word("API", "A P I")
ps.add_word("JSON", "Jay-son")

ps.speak("The API returns JSON data")

Export/Import Data

from pyvoicecraft import PyVoiceCraft

ps = PyVoiceCraft()

# Export all data
ps.export_data("backup.json")

# Import data
ps.import_data("backup.json")

System Requirements

  • Python 3.7+
  • Windows, macOS, or Linux
  • Microphone (for speech recognition)
  • Speakers/headphones (for audio output)

License

This project is licensed under the MIT License - see the LICENSE file for details.

Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Support

If you encounter any issues or have questions:

Changelog

v1.0.0

  • Initial release
  • Text-to-speech functionality
  • Speech recognition
  • Voice profiles
  • Audio processing effects
  • Voice commands
  • Conversation history
  • Custom dictionary support

Author

Kodukulla.Phani Kumar


⭐ If you find PyVoiceCraft useful, please give it a star on GitHub!

Metadata

Release files for pyvoicecraft 1.0.0

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

Source distribution (sdist)

Source distribution for pyvoicecraft 1.0.0
File Size Uploaded Provenance Actions
pyvoicecraft-1.0.0.tar.gz 14.0 kB Without provenance Details for pyvoicecraft-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pyvoicecraft 1.0.0
File Interpreter ABI Platform Actions
pyvoicecraft-1.0.0-py3-none-any.whl Python 3 none any Details for pyvoicecraft-1.0.0-py3-none-any.whl

Total release size: 26.3 kB

Release files / pyvoicecraft-1.0.0.tar.gz

Download URL pyvoicecraft-1.0.0.tar.gz
Size 14.0 kB
Tags Source
SHA-256 checksum
How to use checksums
b9615a2cf8c503aa98676d1865a98d3fea7a177ca5a05f279315360546967e4d
BLAKE2b-256 checksum
How to use checksums
b48fc28ff91261a4b836f66fe161d0c9e0c923d7c1219dae80b019beb7895d15
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.11

Release files / pyvoicecraft-1.0.0-py3-none-any.whl

Download URL pyvoicecraft-1.0.0-py3-none-any.whl
Size 12.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
820b6e77c925f6ea81f8a530def93800623e080b9aba343047f887dd8204df66
BLAKE2b-256 checksum
How to use checksums
a3fdfe2a71afb71bce09b22a262c4576518a00522df564de66f03ea92622ad12
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.11

Security for pyvoicecraft 1.0.0

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.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files No provenance

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