Skip to main content

Creates a silent WAV file with the specified duration and saves it to the given filename.

Project description

Creates a silent WAV file with the specified duration and saves it to the given filename.

pip install silentwav

Tested against Windows 10 / Python 3.10 / Anaconda

Creates a silent WAV file with the specified duration and saves it to the given filename.

Parameters:
	filename (str): The path and filename of the WAV file to be created.
	duration (int | float): The duration of the silent WAV file in seconds.
	sample_rate (int, optional): The number of samples per second. Defaults to 44100.
	num_channels (int, optional): The number of audio channels. Defaults to 1 (mono).
	sample_width (int, optional): The size of each audio sample in bytes. Defaults to 2 bytes (16-bit audio).
	compression_type (str, optional): The type of compression for the WAV file. Defaults to "NONE".
	compression_name (str, optional): A description of the compression used. Defaults to "not compressed".

Returns:
	None: This function does not return any value but creates a silent WAV file and saves it to the specified filename.

Example:
	from silentwav import create_silent_wav
	# Creates a 60-second silent WAV file named "c:\\silent_file.wav"
	create_silent_wav("c:\\silent_file.wav", duration=60)

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

silentwav-0.10.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

silentwav-0.10-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

Details for the file silentwav-0.10.tar.gz.

File metadata

  • Download URL: silentwav-0.10.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.10

File hashes

Hashes for silentwav-0.10.tar.gz
Algorithm Hash digest
SHA256 d34de69e32be0f678c8ad40a2a5d21168c26c62598ece7576da10311925be122
MD5 58d56cce39dfbc42dc5ad3103a249ce0
BLAKE2b-256 1980b90978f914b3eafa7cf5ccec731c30eab75cf420d31c801fa28004d721c8

See more details on using hashes here.

File details

Details for the file silentwav-0.10-py3-none-any.whl.

File metadata

  • Download URL: silentwav-0.10-py3-none-any.whl
  • Upload date:
  • Size: 5.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.10

File hashes

Hashes for silentwav-0.10-py3-none-any.whl
Algorithm Hash digest
SHA256 5242141680233d82130224c55c898480133024336069c5d24eb8fa68c56cff5f
MD5 e6a2e4cc2928da7d5f9fb85802fe8a2e
BLAKE2b-256 066099dfe32f829a78de663ab6bff85056b291a63df9db86b97bc19e4910bdb8

See more details on using hashes here.

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