diff --git a/src/fenrir/soundDriver/dummy.py b/src/fenrir/soundDriver/dummy.py new file mode 100644 index 00000000..6c45bd35 --- /dev/null +++ b/src/fenrir/soundDriver/dummy.py @@ -0,0 +1,27 @@ +#!/bin/python +# -*- coding: utf-8 -*- + +# Fenrir TTY screen reader +# By Chrys, Storm Dragon, and contributers. + +from core import debug + +class driver(): + def __init__(self): + self.volume = None + def initialize(self, environment): + self.env = environment + def shutdown(self): + self.cancel() + def playFrequence(self, frequence = 1000, duration = 0.3, adjustVolume = 0): + if interrupt: + self.cancel() + def playSoundFile(self, filePath, interrupt = True): + if interrupt: + self.cancel() + def cancel(self): + pass + def setCallback(self, callback): + pass + def setVolume(self, volume): + self.volume = volume diff --git a/src/fenrir/speechDriver/generic.py b/src/fenrir/speechDriver/dummy.py similarity index 97% rename from src/fenrir/speechDriver/generic.py rename to src/fenrir/speechDriver/dummy.py index 1afb8717..085a07d0 100644 --- a/src/fenrir/speechDriver/generic.py +++ b/src/fenrir/speechDriver/dummy.py @@ -8,7 +8,7 @@ from core import debug class driver(): - def __init__(self ): + def __init__(self): pass def initialize(self, environment): self._isInitialized = False @@ -54,6 +54,7 @@ class driver(): def setModule(self, module): if not self._isInitialized: return False + return True def setLanguage(self, language): if not self._isInitialized: diff --git a/src/fenrir/speechDriver/espeak.py b/src/fenrir/speechDriver/espeak.py index 0bae1503..7d9bef65 100644 --- a/src/fenrir/speechDriver/espeak.py +++ b/src/fenrir/speechDriver/espeak.py @@ -8,7 +8,7 @@ from core import debug class driver(): - def __init__(self ): + def __init__(self): self._es = None self._isInitialized = False diff --git a/src/fenrir/speechDriver/speechd.py b/src/fenrir/speechDriver/speechd.py index 49fc7894..8a7ef856 100644 --- a/src/fenrir/speechDriver/speechd.py +++ b/src/fenrir/speechDriver/speechd.py @@ -8,7 +8,7 @@ from core import debug class driver(): - def __init__(self ): + def __init__(self): self._sd = None self._isInitialized = False self._language = ''