diff --git a/README.md b/README.md index f385741..c7a3bf0 100644 --- a/README.md +++ b/README.md @@ -2807,11 +2807,11 @@ write_to_wav_file('test.wav', samples_f) #### Plays a WAV file: ```python # $ pip3 install simpleaudio -import simpleaudio +from simpleaudio import play_buffer with wave.open('test.wav', 'rb') as file: p = file.getparams() frames = file.readframes(p.nframes) - simpleaudio.play_buffer(frames, p.nchannels, p.sampwidth, p.framerate) + play_buffer(frames, p.nchannels, p.sampwidth, p.framerate) ``` ### Text to Speech diff --git a/index.html b/index.html index 5cf41eb..07c621c 100644 --- a/index.html +++ b/index.html @@ -2387,11 +2387,11 @@ write_to_wav_file('test.wav', samples_f)

Plays a WAV file:

# $ pip3 install simpleaudio
-import simpleaudio
+from simpleaudio import play_buffer
 with wave.open('test.wav', 'rb') as file:
     p = file.getparams()
     frames = file.readframes(p.nframes)
-    simpleaudio.play_buffer(frames, p.nchannels, p.sampwidth, p.framerate)
+    play_buffer(frames, p.nchannels, p.sampwidth, p.framerate)
 

Text to Speech

# $ pip3 install pyttsx3