def read_clipboard(self):
"""
@description: A function to make mama reads the selected
text
"""
clipboard = Gtk.Clipboard.get(Gdk.SELECTION_PRIMARY)
text = clipboard.wait_for_text()
if text:
text = text.replace("'", ' ')
TextToSpeech(self.config, text)
else:
TextToSpeech('Nothing in the clipboard')
评论列表
文章目录