Added functions in the python wrapper for speechd
parent
4628dce7bb
commit
e84d5ab6bf
|
@ -0,0 +1,9 @@
|
||||||
|
import libspeechd
|
||||||
|
|
||||||
|
speech = libspeechd.Speech
|
||||||
|
|
||||||
|
speech.Initialize(self=speech)
|
||||||
|
|
||||||
|
speech.Say(self=speech, text="hello", interrupt=False)
|
||||||
|
|
||||||
|
speech.Close(self=speech)
|
|
@ -0,0 +1,14 @@
|
||||||
|
import libspeechd
|
||||||
|
import time
|
||||||
|
|
||||||
|
speech = libspeechd.Speech
|
||||||
|
|
||||||
|
speech.Initialize(self=speech)
|
||||||
|
|
||||||
|
speech.Say(self=speech, text="This is a very very very long string.", interrupt=False)
|
||||||
|
|
||||||
|
time.sleep(1)
|
||||||
|
|
||||||
|
speech.Say(self=speech, text="I interrupted :)", interrupt=True)
|
||||||
|
|
||||||
|
speech.Close(self=speech)
|
|
@ -1,12 +1,18 @@
|
||||||
from multiprocessing.connection import wait
|
|
||||||
from threading import Thread
|
|
||||||
from time import time
|
|
||||||
import speechd
|
import speechd
|
||||||
import time
|
|
||||||
|
|
||||||
client = speechd.SSIPClient('test')
|
class Speech:
|
||||||
client.speak("Hello World! this is yusuf")
|
client = None
|
||||||
time.sleep(1)
|
|
||||||
client.stop()
|
def Initialize(self):
|
||||||
client.speak("No this is shoaib")
|
self.client = speechd.SSIPClient('stardew-access')
|
||||||
client.close()
|
|
||||||
|
def Say(self, text, interrupt):
|
||||||
|
if(self.client is not None):
|
||||||
|
if(interrupt):
|
||||||
|
self.client.stop()
|
||||||
|
|
||||||
|
self.client.speak(text)
|
||||||
|
|
||||||
|
def Close(self):
|
||||||
|
if(self.client is not None):
|
||||||
|
self.client.close()
|
|
@ -13,6 +13,7 @@
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="AccessibleOutput" Version="1.0.0" />
|
<PackageReference Include="AccessibleOutput" Version="1.0.0" />
|
||||||
<PackageReference Include="AutoHotkey.Interop" Version="1.0.0.1" />
|
<PackageReference Include="AutoHotkey.Interop" Version="1.0.0.1" />
|
||||||
|
<PackageReference Include="IronPython" Version="2.7.12" />
|
||||||
<PackageReference Include="Lib.Harmony" Version="2.2.0" />
|
<PackageReference Include="Lib.Harmony" Version="2.2.0" />
|
||||||
<PackageReference Include="Pathoschild.Stardew.ModBuildConfig" Version="4.0.0" />
|
<PackageReference Include="Pathoschild.Stardew.ModBuildConfig" Version="4.0.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
Loading…
Reference in New Issue