this code below works. can you please add a variable that makes the sound less or more dynamic?
import numpy as np
import wave
import pyaudio

# Open wave file
wav_file = wave.open('C:/Users/workpc/Desktop/wavefiles/example223.wav', 'rb')

# Initialize PyAudio
p = pyaudio.PyAudio()

# Open PyAudio stream
stream = p.open(format=p.get_format_from_width(wav_file.getsampwidth()),
                channels=wav_file.getnchannels(),
                rate=wav_file.getframerate(),
                output=True)

# Read first chunk of data
data = wav_file.readframes(2048)

# Initialize decibel step table
x_vals = np.array([0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, 160, 170, 180, 190, 200, 210, 220, 230, 240, 250, 260, 270, 280, 290, 300])
y_vals = np.array([-96.0, -90.3, -84.6, -78.9, -73.2, -67.5, -61.8, -56.1, -50.4, -44.7, -39.0, -33.3, -27.6, -21.9, -16.2, -10.5, -4.8, 0.9, 6.6, 12.3, 18.0, 23.7, 29.4, 35.1, 40.8, 46.5, 52.2, 57.9, 63.6, 69.3, 75.0])

# NAME_1 through wave file
while data:
    # Convert data to numpy array of 32-bit floating-point values
    audio_data = np.frombuffer(data, dtype=np.float32)
    
    # Apply decibel step table to audio data
    db_table = np.interp(audio_data, x_vals, y_vals, left=None, right=None, period=None)
    db_table[db_table == -np.inf] = min(y_vals)



    # Write data to stream
    stream.write(audio_data.tobytes())

    # Read next chunk of data
    data = wav_file.readframes(2048)

# Close stream and PyAudio
stream.stop_stream()
stream.close()
p.termi