Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall
diff options
context:
space:
mode:
authorAnton Hvornum <anton.feeds+github@gmail.com>2020-10-18 11:58:53 +0200
committerAnton Hvornum <anton.feeds+github@gmail.com>2020-10-18 11:58:53 +0200
commit973abec8549c5fb5a85f889b2c8f80f50b8e2a7b (patch)
tree0035d4283bff45b7f59718a8160fa8bac307ae08 /archinstall
parenta60a3ca812619ace82993272233b9783cf4bc4fe (diff)
parent90eff266576a5fc2fe9f690e835c876aa405fe6d (diff)
Merge remote-tracking branch 'origin' into profile
Diffstat (limited to 'archinstall')
-rw-r--r--archinstall/__init__.py1
-rw-r--r--archinstall/lib/output.py6
-rw-r--r--archinstall/lib/tts.py36
3 files changed, 1 insertions, 42 deletions
diff --git a/archinstall/__init__.py b/archinstall/__init__.py
index 8bce8047..ad4220f2 100644
--- a/archinstall/__init__.py
+++ b/archinstall/__init__.py
@@ -11,4 +11,3 @@ from .lib.locale_helpers import *
from .lib.services import *
from .lib.packages import *
from .lib.output import *
-from .lib.tss import * \ No newline at end of file
diff --git a/archinstall/lib/output.py b/archinstall/lib/output.py
index a2711f54..d1b418d9 100644
--- a/archinstall/lib/output.py
+++ b/archinstall/lib/output.py
@@ -1,5 +1,4 @@
import sys
-from .tts import TTS
# Found first reference here: https://stackoverflow.com/questions/7445658/how-to-detect-if-the-console-does-support-ansi-escape-codes-in-python
# And re-used this: https://github.com/django/django/blob/master/django/core/management/color.py#L12
@@ -44,7 +43,4 @@ def log(*args, **kwargs):
kwargs = {'bg' : 'black', 'fg': 'white', **kwargs}
string = stylize_output(string, **kwargs)
- print(string)
- with TTS() as tts_instance:
- if tts_instance.is_available:
- tts_instance.speak(string.replace('-', '').strip().lstrip())
+ print(string) \ No newline at end of file
diff --git a/archinstall/lib/tts.py b/archinstall/lib/tts.py
deleted file mode 100644
index d94fbf1e..00000000
--- a/archinstall/lib/tts.py
+++ /dev/null
@@ -1,36 +0,0 @@
-class TTS():
- def __init__(self):
- try:
- import pyttsx3
- self._available = True
- except:
- self._available = False
-
- @property
- def available(self):
- return self._available
- @property
- def is_available(self):
- return self._available
-
- @property
- def volume(self):
- return self.engine.getProperty('volume')
-
- @volume.setter
- def volume(self, percentage):
- self.engine.setProperty('volume', percentage/100)
- return self.volume
-
-
- def speak(self, phrase):
- if self.available:
- self.engine.say("I will speak this text")
- engine.runAndWait()
-
- def __enter__(self):
- self.engine = pyttsx3.init()
- return self
-
- def __exit__(self, *args, **kwargs):
- self.engine.stop() \ No newline at end of file