[go: up one dir, main page]

0% found this document useful (0 votes)
25 views2 pages

Lab Task # 5 Speech To Text AI

The document provides instructions for a computer science lab task to build an audio book using text-to-speech technology. It outlines 4 tasks: 1) using the gTTS library to convert text to speech and save it as a variable, 2) creating a function that takes text as a parameter and converts it to speech, 3) installing the pyttsx3 library and using it to convert text to speech, 4) using pyttsx3 to convert a longer passage to speech. Students are instructed to complete the tasks to learn how to generate audio books from text using artificial intelligence text-to-speech capabilities.

Uploaded by

Maryam
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views2 pages

Lab Task # 5 Speech To Text AI

The document provides instructions for a computer science lab task to build an audio book using text-to-speech technology. It outlines 4 tasks: 1) using the gTTS library to convert text to speech and save it as a variable, 2) creating a function that takes text as a parameter and converts it to speech, 3) installing the pyttsx3 library and using it to convert text to speech, 4) using pyttsx3 to convert a longer passage to speech. Students are instructed to complete the tasks to learn how to generate audio books from text using artificial intelligence text-to-speech capabilities.

Uploaded by

Maryam
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

ISRA UNIVERSITY

Department of Computer Science

(CSAI-412) Artificial Intelligence


Lab Task # 5
Fall 2023
Instructor: Areeba Naeem
Date: 31-JAN-2023
WEEK # 5

Build your own Audio Book using AI


(Text-to-Speech)
Task # 1
Step no# 1:
Install pip install gTTS in prompt command
C:\Python\Python37\Scripts>pip install gTTS

Step no# 2:
Write down the following code:

The above code is importing a library and creating a variable which is calling and
receiving a sound of HELLO and saving it in variable tts.

Task # 2
Make the above program using function. Pass a string variable to a function which
carries the text and convert it into speech. Audio should play “I am using Artificial
Intelligence to create text to speech”.
Task # 3
Step no# 1:
C:\Python\Python37\Scripts>pip install gTTS
Install in terminal pip install pyttsx3

Step no# 2:
Write down the following code:

Task # 4
Make the program using pyttsx3 library. Audio should play “Mobilizing others to
achieve purpose under conditions of uncertainty—what leaders do—challenges the
hands, the head, and the heart. ”

You might also like