Questions tagged [pyttsx3]

pyttsx3 is a text-to-speech conversion library in Python. Unlike alternative libraries, it works offline, and is compatible with both Python 2 and 3.

pyttssx3 is an offline text-to-speech library for Python. It supports multiple TTS engines, including Sapi5, nsss, and espeak.

251 questions
0
votes
1 answer

line 8, in speak voiceEngine.getProperty("rate", 100) TypeError: getProperty() takes 2 positional arguments but 3 were given

This is my code import pyttsx3 # This function is used to process text and speak it out def speak (lis): voiceEngine = pyttsx3.init() voiceEngine.getProperty("rate", 100) #voice_id =…
0
votes
0 answers

Datetime not returning anything in python

Trying to build an AI and everything was working until I try to call date(). Am I calling it correctly? Thank you greatly for your help import pyttsx3 import datetime engine = pyttsx3.init() def speak(audio): engine.say(audio) …
May Mammaz
  • 61
  • 1
  • 3
0
votes
0 answers

I am getting error while using pyttsx3 in my program

I used pyttsx3 for text to speech conversion but it showed an error .I used all required modules including pypiwin32 but even I have uninstall the old version of python which was 2.7 , currently I am using python 3.9 version. HERE IS CODE import…
0
votes
0 answers

why do i get this error "expection" every time i run my voice assistant?

sometimes i get this error sometimes I don't it comes and goes, is there a way to fix? did i make a mistake somewhere in the code? def audio(): r = sr.Recognizer() with sr.Microphone() as source: r.adjust_for_ambient_noise(source,…
0
votes
1 answer

DialoGPT output using pyttsx3?

I want to use DialoGPT to have a conversation with me using a microphone and speaker. However, before I get there, I want to begin by somehow connecting this chat bot to a speaker using pyttsx3. I am able to properly use pyttsx3 to produce sound out…
0
votes
2 answers

trying to use pyttsx3, getting multiple errors, KeyError: 'sapi5', ImportError: No system module 'pywintypes' (pywintypes39.dll)

My code: import pyttsx3 #sapi5 is default windows voice api engine = pyttsx3.init('sapi5') voices = engine.getProperty('voices') print(voices[1].id) engine.setProperty('voice', voices[0].id) def speak(audio): pass On running the code instead…
sub0d33p
  • 1
  • 3
0
votes
2 answers

Why is my ttsx3 in Python not playing any audio

I am using pycharm and have pyaudio and pyttsx3 installed. my issue is the audio from my text to speech is not playing. I can see the text being put down in the console so I know that everything else works. Here's the code relating to the tts. …
0
votes
1 answer

How to play gif while using pyttsx3

I have an appliaction which asks the user questions which they should answer. The application uses pyttsx3 (version 2.9) to generate speech and I would like that while it speaks and only then, a gif animation would play for as long as it speaks. How…
0
votes
0 answers

Microphone driver in VM Ubuntu

I have installed pyttsx3 for my speech recognition project and even after successfully recording my audio terminal sends back a exception calling init.py. With the help of SpeechRecognition I tried to build this program and it gives some…
Zemo
  • 3
  • 4
0
votes
0 answers

PYTTSX3 only plays first sentence of a line (Python text to speech)

Essentially, the idea is to open a document ("document2read.txt") and read all the lines from it. Each line contains three full sentences. Then, each line is made into an audio clip, saved with a unique name (audio_0.mp3, audio_1.mp3, etc). Heres my…
Glitchin
  • 21
  • 4
0
votes
0 answers

Voice Recognition Python Module Stopped Working After 6 Months

I made a small voice assistant 6 months ago using the voice recognition /pyttsx3 python module and it has been working for those 6 months until as of recently it seems to have stopped working. Since when I start running the script it just doesn't…
0
votes
1 answer

AttributeError: module 'pyttsx3' has no attribute 'init' but i tried everything

So i had a much bigger problem ,but i sorted that out. Now, i have this error command: pygame 2.0.1 (SDL 2.0.14, Python 3.7.9) Hello from the pygame community. https://www.pygame.org/contribute.html Traceback (most recent call last): File…
gabor
  • 1
0
votes
1 answer

I have a problem with pyttx3. what should i do?

Ubuntu is installed on my laptop. import pyttsx3 engine=pyttsx3.init() engine.say('Sa1lly sells seashells by the seashore.') /usr/bin/python3 /home/shohruz/Desktop/Development/solo.py Traceback (most recent call last): File…
UZ Hacker
  • 9
  • 1
0
votes
0 answers

ModuleNotFoundError: No module named 'pyttsx3' On VS Code But Normally On Terminal It's Working Fine

While I'm Open My main.py file on terminal it's working fine. But, On VS Code Editor While I'm Clicking On Run Button, In Terminal it's says : ModuleNotFoundError: No module named 'pyttsx3' How this problem will be solved ?
0
votes
1 answer

'pyttsx3' module is giving "KeyError : sapi5" and many more

When I am trying to execute the following TTS code in python 3.8.1, import pyttsx3 #pip install pyttsx3 engine = pyttsx3.init('sapi5') voices = engine.getProperty('voices') engine.setProperty('voice', voices[0].id) engine.say("Hi Nilesh. Good…