Base64Sound

December 22, 2023 ยท View on GitHub

from tdw.physics_audio.base64_sound import Base64Sound

This class is used only in PyImpact, which has been deprecated. See: Clatter.

A sound encoded as a base64 string.


Fields

  • bytes Byte data of the sound.

  • wav_str A base64 string of the sound. Send this to the build.

  • length The length of the byte array.


Functions

__init__

Base64Sound(snd)

ParameterTypeDefaultDescription
sndnp.ndarrayThe sound byte array.

write

self.write(path)

Write audio to disk.

ParameterTypeDefaultDescription
pathPATHThe path to the .wav file.