Comments (1)
When you run subprocess.Popen
, it returns a Popen object on which you can call kill()
to kill its attached process. Just store a reference in your MainWindow class and add a function to run kill
:
class MainWindow:
def whatever_makes_sox(self):
self.sox_proc = subprocess.Popen(whatever)
def cleanup(self):
if self.sox_prox:
self.sox_proc.kill()
Then add a global try/except handler wrapping your Gtk.main()
, for example:
try:
Gtk.main()
except BaseException e:
win.cleanup()
(Catching BaseException
means it'll also catch KeyboardInterrupt
, SystemExit
, and a few others that don't inherit from Exception
)
I'm not on my dev machine right now so can't make a PR, but I think that should do it.
from lyrebird.
Related Issues (20)
- Flatpak package HOT 3
- LyreBird not Launching HOT 1
- No such file or directory HOT 7
- How to define and load Custom voice?
- Dependency safeguards are needed
- Issue in installation HOT 5
- Help needed! Packaging for other distros
- Module initialization failed Ubuntu 22.04 HOT 2
- Add translation
- Can Lyrebird work on Mac HOT 1
- IDK why but lyrebird doesnt work on my ubuntu HOT 1
- Lyrebird refuses to work, no input device created HOT 2
- Audio utilities missing
- Lyrebird doesnt show input device for discord
- Not working on Mint 21.2 Cinnamon HOT 9
- No sound HOT 7
- Couldn't install package from Aur HOT 4
- it doesnt change the voice HOT 4
- Multiple issues installing (Linux Mint 20.3)
- Everything is great but there is no audio output from the SOX process HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lyrebird.