diff --git a/index.html b/index.html index da52fc7..3f3bfb1 100644 --- a/index.html +++ b/index.html @@ -2370,8 +2370,7 @@ samples_f = (add_noise(f) for f 'test.wav', samples_f) -

Plays a WAV file:

# $ sudo apt install libasound2-dev
-# $ pip3 install simpleaudio
+

Plays a WAV file:

# $ pip3 install simpleaudio
 from simpleaudio import play_buffer
 with wave.open('test.wav', 'rb') as file:
     p = file.getparams()
@@ -2379,10 +2378,11 @@ write_to_wav_file('test.wav', samples_f)
     play_buffer(frames, p.nchannels, p.sampwidth, p.framerate)
 
-

Text to Speech

# $ sudo apt install espeak ffmpeg libespeak1
-# $ pip3 install pyttsx3
+

Text to Speech

# $ pip3 install pyttsx3
 import pyttsx3
-pyttsx3.speak(<str>)                            # Reads the string while blocking.
+engine = pyttsx3.init()
+engine.say('Sally sells seashells by the seashore.')
+engine.runAndWait()
 

#Synthesizer

Plays Popcorn by Gershon Kingsley:

# $ pip3 install simpleaudio