From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Alvaro Ramirez Newsgroups: gmane.emacs.bugs Subject: bug#72827: [PATCH] Adds NSSpeechRecognitionUsageDescription to Info.plist.in Date: Tue, 27 Aug 2024 10:12:48 +0100 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7464"; mail-complaints-to="usenet@ciao.gmane.io" Cc: copyright-clerk@fsf.org To: 72827@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Aug 27 11:13:41 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sisGi-0001nR-Tw for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 27 Aug 2024 11:13:41 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sisGM-0005D0-A4; Tue, 27 Aug 2024 05:13:18 -0400 Original-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 1sisGF-0005CY-Gg for bug-gnu-emacs@gnu.org; Tue, 27 Aug 2024 05:13:12 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sisGF-0004TU-7y for bug-gnu-emacs@gnu.org; Tue, 27 Aug 2024 05:13:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:From:To:Subject; bh=ieelN7svmYvwyw+ypm1wjejj3y2Rv8H0oFDBxQKD54o=; b=dErLPJx0CAXGcpNivgMFs33KNmVF+Q4Vqyz69fwvMgaAFyiQRe2K9PvfYokrmLUcKoZWFhSIz6OB5MpkvF9iBu/jtBkQTIhpeL3oQFz3E6d/+/5AiH98QbYpcsf2WRDHsWLwzSQ8lajoV8XCbgsNUGPFWrhcC8J35KijQfHxprd8itQ3QAPiRJ28Pz5vLcVWPygY2+63vZmOYY0bcUK9ZkxDed88OG7M1x5VHadnjrB6NTmOQ1FCZKYoscsEro1hFruFi20P9Abd5hl1a2nKX5F9R/CSXIrwGwp5quvqygq85fnzJVHl2im6zMFgHZkk9RZkxDpt++LGbr7NHz3mQQ==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sisH4-0004tn-JN for bug-gnu-emacs@gnu.org; Tue, 27 Aug 2024 05:14:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alvaro Ramirez Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 27 Aug 2024 09:14:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 72827 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.172475003418807 (code B ref -1); Tue, 27 Aug 2024 09:14:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 27 Aug 2024 09:13:54 +0000 Original-Received: from localhost ([127.0.0.1]:46041 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sisGw-0004tG-C2 for submit@debbugs.gnu.org; Tue, 27 Aug 2024 05:13:54 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:60708) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sisGv-0004t9-6K for submit@debbugs.gnu.org; Tue, 27 Aug 2024 05:13:54 -0400 Original-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 1sisG4-0005Bv-I8 for bug-gnu-emacs@gnu.org; Tue, 27 Aug 2024 05:13:00 -0400 Original-Received: from out-173.mta1.migadu.com ([95.215.58.173]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sisG1-0004Q2-T9 for bug-gnu-emacs@gnu.org; Tue, 27 Aug 2024 05:13:00 -0400 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xenodium.com; s=default; t=1724749972; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type; bh=ieelN7svmYvwyw+ypm1wjejj3y2Rv8H0oFDBxQKD54o=; b=IhItpoheK1HQTVfkt89ahFahJYXBzPFkH6rKGlm8V42WAuAkSEzIK6nzsyGDJ/BoReXEnj 32ZC1E7kzfb3xVajNjk9NVELmSJ2QC9zK/m/UKX8iOJAXgdB9AjuvEm2C7sDEiXDs+VtGg wZG8w3QHoCk4OSTAu7eTssLWj92W4Ic= X-Migadu-Flow: FLOW_OUT Received-SPF: pass client-ip=95.215.58.173; envelope-from=alvaro@xenodium.com; helo=out-173.mta1.migadu.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:290806 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Hi folks, Here's a tiny patch to add NSSpeechRecognitionUsageDescription to=20 Info.plist.in. Without NSSpeechRecognitionUsageDescription, we cannot launch=20 processes that use macOS's speech recognition APIs (including=20 built-in shells). Here's an eshell example: $ macosrec --speech-to-text --input /tmp/audio.mp3 abort trap: 6 With NSSpeechRecognitionUsageDescription in place, macOS displays=20 a dialog asking users to grant permission and allows the speech=20 APIs to be used from the process. Added change to Emacs 31 NEWS. If there's any chance the=20 permission can make it to 30, I'd be happy to rework the patch as=20 needed. Cheers, =C3=81lvaro ps. My copyright assignment paperwork has been is=20 submitted. Awaiting copyright-clerk reply. In GNU Emacs 31.0.50 (build 1, aarch64-apple-darwin23.5.0, NS appkit-2487.60 Version 14.5 (Build 23F79)) of 2024-08-27 built on=20 jiko Windowing system distributor 'Apple', version 10.3.2487 System Description: macOS 14.5 Configured using: 'configure --with-ns' --=-=-= Content-Type: text/patch Content-Disposition: attachment; filename=0001-Adds-NSSpeechRecognitionUsageDescription-to-Info-plist-in.patch >From db657bf4373115883634932a9a8200043b046184 Mon Sep 17 00:00:00 2001 From: xenodium Date: Tue, 27 Aug 2024 09:36:56 +0100 Subject: [PATCH] Adds NSSpeechRecognitionUsageDescription to Info.plist.in Without it, we cannot launch processes that use macOS's speech recognition APIs. With NSSpeechRecognitionUsageDescription in place, macOS displays the dialog asking the user to grant permission and allows the speech APIs to be used from the process. --- etc/NEWS | 6 ++++++ nextstep/templates/Info.plist.in | 2 ++ 2 files changed, 8 insertions(+) diff --git a/etc/NEWS b/etc/NEWS index 07d1cce0966..556b6005f32 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -43,6 +43,12 @@ The 'find-function', 'find-library', 'find-face-definition', and 'find-variable' commands now allow retrieving previous input using the usual minibuffer history commands. Each command has a separate history. +--- +** NSSpeechRecognitionUsageDescription now included in Info.plist (macOS). +Should Emacs (or any built-in shell) invoke a process using macOS speech +recognition APIs, the relevant permission dialog is now displayed, thus +allowing Emacs users access to speech recognition utilities. + ** Minibuffer and Completions +++ diff --git a/nextstep/templates/Info.plist.in b/nextstep/templates/Info.plist.in index beddbf4a893..192c061bd1e 100644 --- a/nextstep/templates/Info.plist.in +++ b/nextstep/templates/Info.plist.in @@ -693,5 +693,7 @@ along with GNU Emacs. If not, see . Emacs requires permission to access the Downloads folder. NSRemovableVolumesUsageDescription Emacs requires permission to access files on Removable Volumes. + NSSpeechRecognitionUsageDescription + Emacs requires permission to handle any speech recognition. -- 2.39.3 (Apple Git-146) --=-=-=--