From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id YJasOdI4fGNJrgAAbAwnHQ (envelope-from ) for ; Tue, 22 Nov 2022 03:49:55 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id iKevOdI4fGP2UAEA9RJhRA (envelope-from ) for ; Tue, 22 Nov 2022 03:49:54 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id A5E2F1A154 for ; Tue, 22 Nov 2022 03:49:54 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oxJLj-0002ec-GS; Mon, 21 Nov 2022 21:49:27 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oxJLh-0002e6-G6 for guix-devel@gnu.org; Mon, 21 Nov 2022 21:49:25 -0500 Received: from sender4-op-o14.zoho.com ([136.143.188.14]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oxJLf-00071V-NO for guix-devel@gnu.org; Mon, 21 Nov 2022 21:49:25 -0500 ARC-Seal: i=1; a=rsa-sha256; t=1669085358; cv=none; d=zohomail.com; s=zohoarc; b=MPzXj4Q9Tx8nwfzCnTnKy7kTPPkOKhSEbpC+lQtZO/EdV41ytpRx14deDSM48tK0/hG47elWDOYdirhVM+aqsy7mnVmqOSNbnMXB3VVBvqAU+JbhZ2i/LQ7numRjqlPH/XzVtoMdzTuAt6JTa20bGgqqlTk1KEtbl+f9LhgnQnU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1669085358; h=Content-Type:Date:From:MIME-Version:Message-ID:Subject:To; bh=jx0lQhrF8iuAlVwzcYKWJsGeMLTWUEuSsEBXLKVxT2o=; b=P1rzkbJngwB484ExTQPs+YMmuhySOG9EL1aQdL7c5wCxq7lEKdn5nUWTCZsRvFRWrtJlq8oFydHL3+kR3D1GvqO+5FcCVeoZTV2SvTX2oQm5osV6/r5pCjK/U9HT4A7CmpxUXzZMXdLHijwS2mZcQYdU9MSQtbD6OOFqHqbOPm4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=excalamus.com; spf=pass smtp.mailfrom=matt@excalamus.com; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1669085358; s=zmail; d=excalamus.com; i=matt@excalamus.com; h=Date:Date:From:From:To:To:Message-Id:Message-Id:In-Reply-To:Subject:Subject:MIME-Version:Content-Type:Reply-To:Cc; bh=jx0lQhrF8iuAlVwzcYKWJsGeMLTWUEuSsEBXLKVxT2o=; b=WLCsIWfW9kqlBMul9nSC6BycQTUpjv6e6Ag3753J4sleSM/DA+gaaMXtSx2cswxQ s5TFnc81W722jBCj7r3wtH09QoQ0XCgQennffzWl8Epe2zaLzhQ0DYpI6g8wC9NTj8a iT1Z5CXC9UmCElPygMFR817fj9gpr7hMT+pkuW78= Received: from mail.zoho.com by mx.zohomail.com with SMTP id 1669085356687433.06077827311697; Mon, 21 Nov 2022 18:49:16 -0800 (PST) Date: Mon, 21 Nov 2022 21:49:16 -0500 From: Matt To: "guix-devel" Message-Id: <1849d3d626c.c7f6f4032451917.7268941726749635039@excalamus.com> In-Reply-To: Subject: QtTextToSpeech MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_7824747_1394442881.1669085356652" Importance: Medium User-Agent: Zoho Mail X-Mailer: Zoho Mail X-Zoho-Virus-Status: 1 Received-SPF: pass client-ip=136.143.188.14; envelope-from=matt@excalamus.com; helo=sender4-op-o14.zoho.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: guix-devel-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1669085394; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=jx0lQhrF8iuAlVwzcYKWJsGeMLTWUEuSsEBXLKVxT2o=; b=IOLllVDA3HvuM5OpAAheEnD2ms8/lHW32Xyxj+xwVdD3qJBTcQU6tkLonHITghI0NCQ199 mhOFdbYcFk72Oolmghv+qNdcz5KkZ48bjGuhvjT0sqovds61ZWoLpt/KlZ2EaPf5L57fN9 E2RhMOw8WrTgNk0JnL+ZfZkiYsqWDDVJyKgJXGH842feOj8i8f/0K5OEy81BFfE6jbJZo4 H7Q6ZuhM1ofHEbNh5qxXdGacMfsRS0ZCWyt2xXa0tCkbCGIux03lJlTn5Jnfj/Ild3ulL0 ktJcVvJOuWcWDYUozysxSIHcITjaZsIMTueMwc8duizHE3fB6o3aicTq6DBlfw== ARC-Seal: i=2; s=key1; d=yhetil.org; t=1669085394; a=rsa-sha256; cv=pass; b=LhGK+tuMTBSaAG8BORvivHaKJ1GRN08vBtevL4utqVlvftsSqEWllozDKN//YpOKee3Zfn mXUBiG9hbf/Pmzf/yJ4XFeydejZ6yDbyvc7itSGA18i0MISHqbeb1slr9slhOyNvd8o4hU rkzp8EEu+J4Pb/h8VbwOjv+aJeQtu04PzUdGN9vvQwC3ldiYZJwI8i3n9pSzXQe9q18GcY cRY8WdsBH9fJOVDS7wac9Tx9o0XJjo78yxs448PomRvBNF1RsqjvW0NkWNhN32cyD4gy52 QfNw8w1wrNAJrIfSgW2I6iKTnm8C6KYaADtdOZ9Nt51qyXOIzMwziGHsFexMaA== ARC-Authentication-Results: i=2; aspmx1.migadu.com; dkim=pass header.d=excalamus.com header.s=zmail header.b=WLCsIWfW; arc=pass ("zohomail.com:s=zohoarc:i=1"); dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -2.99 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=excalamus.com header.s=zmail header.b=WLCsIWfW; arc=pass ("zohomail.com:s=zohoarc:i=1"); dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: A5E2F1A154 X-Spam-Score: -2.99 X-Migadu-Scanner: scn1.migadu.com X-TUID: XH116TGf4EAn ------=_Part_7824747_1394442881.1669085356652 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit I'm trying to get Text-To-Speech included within the python-pyqt package. It looks like the definition is simply missing a declaration for qtspeech (patch attached). I updated the definition, the package builds, and I'm now able to import the QtTextToSpeech module. However, I'm not able to find an engine, so I can't verify that it's working 100%. To validate the new pyqt functionality, I'm trying to get TTS working using the python-pyside-2 package. That definition already has qtspeech included and I assume it works. Unfortunately, I can't get that to work either. I've installed speech-dispatcher, espeak, espeak-ng, and festival. I'm able to get TTS from the command-line (i.e. spd-say, speak, etc.). However, no voices or engine are found by PyQt or PySide. I've verified that the same program works on a separate Debian machine. Is there some setup for speech-dispatcher that I'm missing? import sys from PySide2 import QtCore, QtWidgets, QtTextToSpeech class MainWindow(QtWidgets.QMainWindow): def __init__(self): super().__init__() self.engine = None self.engine_name = None text ='''Every effort has been made to replicate this text as faithfully as possible, including inconsistencies in spelling and hyphenation. Some corrections of spelling and punctuation have been made. They are listed at the end of the text.''' self.text_edit = QtWidgets.QTextEdit() self.text_edit.setText(text) self.speak_button = QtWidgets.QPushButton('Speak once') self.speak_button.clicked.connect(self.on_speak_button_clicked) # Central widget layout = QtWidgets.QVBoxLayout() layout.addWidget(self.text_edit) layout.addWidget(self.speak_button) centralWidget = QtWidgets.QWidget() centralWidget.setLayout(layout) self.setCentralWidget(centralWidget) engineNames = QtTextToSpeech.QTextToSpeech.availableEngines() if len(engineNames) > 0: self.engine_name = engineNames[0] self.engine = QtTextToSpeech.QTextToSpeech(self.engine_name) voice = self.engine.availableVoices()[0] self.engine.setVoice(voice) else: self.speak_button.setEnabled(False) def on_speak_button_clicked(self): text = self.text_edit.toPlainText() self.engine.say(text) if __name__ == '__main__': app = QtWidgets.QApplication(sys.argv) mainWin = MainWindow() mainWin.show() sys.exit(app.exec_()) ------=_Part_7824747_1394442881.1669085356652 Content-Type: application/octet-stream; name=0001-Add-qtspeech-to-python-pyqt.patch Content-Transfer-Encoding: 7bit X-ZM_AttachId: 138883781566530070 Content-Disposition: attachment; filename=0001-Add-qtspeech-to-python-pyqt.patch >From 93abe594035ae4694aa78cf0ca32b226dbd84eb3 Mon Sep 17 00:00:00 2001 From: Matt Date: Mon, 21 Nov 2022 18:31:17 -0500 Subject: [PATCH] Add qtspeech to python-pyqt --- gnu/packages/qt.scm | 1 + 1 file changed, 1 insertion(+) diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm index 30bf429897..c5ac67a483 100644 --- a/gnu/packages/qt.scm +++ b/gnu/packages/qt.scm @@ -3128,6 +3128,7 @@ (define-public python-pyqt ("qtmultimedia-5" ,qtmultimedia-5) ("qtsensors" ,qtsensors) ("qtserialport" ,qtserialport) + ("qtspeech" ,qtspeech) ("qtsvg-5" ,qtsvg-5) ("qttools-5" ,qttools-5) ("qtwebchannel-5" ,qtwebchannel-5) -- 2.38.1 ------=_Part_7824747_1394442881.1669085356652--