Sprechstimme

raw JSON →
1.8.10 verified Sat May 09 auth: no python

A modular Python synthesizer and sequencer for real-time audio generation and music composition. Current version 1.8.10, released monthly.

pip install sprechstimme
error ModuleNotFoundError: No module named 'sprechstimme'
cause Library not installed or installed in wrong environment.
fix
Run: pip install sprechstimme
error AttributeError: module 'sprechstimme' has no attribute 'Synth'
cause Incorrect import: importing the module itself instead of submodule.
fix
Use: from sprechstimme import Synth
error ValueError: Unknown oscillator: 'custom_osc'
cause Using invalid oscillator name in Synth constructor.
fix
Use one of: 'sine', 'saw', 'square', 'noise'.
gotcha The Synth class expects audio output device to be available; if sounddevice fails, install portaudio or use a virtual device.
fix Install sounddevice and ensure portaudio is installed (e.g., apt-get install portaudio19-dev on Debian).
gotcha The 'oscillator' parameter changed in v1.7 from string to enum-like identifier; old code using custom oscillator names may break.
fix Use one of the built-in oscillators: 'sine', 'saw', 'square', 'noise'.
deprecated The `Sample.initialize()` method is deprecated in v1.8 and will be removed; use `Sample.__init__` directly.
fix Use `sample = Sample(data, rate)` instead of `sample.initialize(data, rate)`.

Basic usage: create a Synth object, generate audio samples.

from sprechstimme import Synth
import numpy as np

# Create a synth with a sine oscillator
synth = Synth(oscillator='sine')
# Generate 1 second of 440 Hz tone
samples = synth.play(440, duration=1.0)
print(samples.shape)