Skip to content

Commit fa54c18

Browse files
author
self
committed
Added new method to cancel messages following switch to manual
recording.
1 parent 702d500 commit fa54c18

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

main.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,8 @@ def main_loop(self):
216216
sys.exit()
217217

218218
if event.key == pygame.K_p and self.working and not self.playing_audio: # Cancel recording
219-
self.cancel = True
219+
#self.cancel = True
220+
info('Function depreciated: say "cancel message please" and press space to stop', 'bad')
220221

221222
if event.key == pygame.K_ESCAPE: # Exiting without saving
222223
info('Exiting (Sounds may continue to play until finished)')
@@ -505,6 +506,13 @@ def listen_for_audio(self, load_run=False):
505506
self.stop_working(tag=True)
506507
return
507508

509+
elif any(phrase in speech for phrase in ['ancel message please', 'ancel message, please',
510+
'lease cancel message', 'ancel message. Please']):
511+
info('Cancelled Message', 'good')
512+
robospeak('Cancelled Message')
513+
self.stop_working(tag=True)
514+
return
515+
508516
elif ('lease toggle eleven labs' in speech or
509517
'lease toggle 11 labs' in speech or
510518
'lease toggle 11 laps' in speech):

0 commit comments

Comments
 (0)