From 089a4c54deda6c744b76efb2af5be86e7ab94108 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jure=20=C5=A0orn?= Date: Mon, 20 Jun 2022 22:24:27 +0200 Subject: [PATCH] Updated index.html --- index.html | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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