all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#72827: [PATCH] Adds NSSpeechRecognitionUsageDescription to Info.plist.in
@ 2024-08-27  9:12 Alvaro Ramirez
  2024-08-29  0:57 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2024-08-30  8:10 ` Stefan Kangas
  0 siblings, 2 replies; 10+ messages in thread
From: Alvaro Ramirez @ 2024-08-27  9:12 UTC (permalink / raw)
  To: 72827; +Cc: copyright-clerk

[-- Attachment #1: Type: text/plain, Size: 1053 bytes --]

Hi folks,

Here's a tiny patch to add NSSpeechRecognitionUsageDescription to 
Info.plist.in.

Without NSSpeechRecognitionUsageDescription, we cannot launch 
processes that use macOS's speech recognition APIs (including 
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 
a dialog asking users to grant permission and allows the speech 
APIs to be used from the process.

Added change to Emacs 31 NEWS. If there's any chance the 
permission can make it to 30, I'd be happy to rework the patch as 
needed.

Cheers,

Álvaro

ps. My copyright assignment paperwork has been is 
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 
 jiko
Windowing system distributor 'Apple', version 10.3.2487
System Description:  macOS 14.5

Configured using:
 'configure --with-ns'


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Adds-NSSpeechRecognitionUsageDescription-to-Info-plist-in.patch --]
[-- Type: text/patch, Size: 1963 bytes --]

From db657bf4373115883634932a9a8200043b046184 Mon Sep 17 00:00:00 2001
From: xenodium <me+gh@xenodium.com>
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 <https://www.gnu.org/licenses/>.
         <string>Emacs requires permission to access the Downloads folder.</string>
         <key>NSRemovableVolumesUsageDescription</key>
         <string>Emacs requires permission to access files on Removable Volumes.</string>
+        <key>NSSpeechRecognitionUsageDescription</key>
+        <string>Emacs requires permission to handle any speech recognition.</string>
 </dict>
 </plist>
-- 
2.39.3 (Apple Git-146)


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* bug#72827: [PATCH] Adds NSSpeechRecognitionUsageDescription to Info.plist.in
  2024-08-27  9:12 bug#72827: [PATCH] Adds NSSpeechRecognitionUsageDescription to Info.plist.in Alvaro Ramirez
@ 2024-08-29  0:57 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2024-08-29  5:05   ` Eli Zaretskii
  2024-08-30  8:10 ` Stefan Kangas
  1 sibling, 1 reply; 10+ messages in thread
From: Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-08-29  0:57 UTC (permalink / raw)
  To: Alvaro Ramirez; +Cc: copyright-clerk, 72827

Alvaro Ramirez <alvaro@xenodium.com> writes:

> Hi folks,
>
> Here's a tiny patch to add NSSpeechRecognitionUsageDescription to
> Info.plist.in.
>
> Without NSSpeechRecognitionUsageDescription, we cannot launch
> processes that use macOS's speech recognition APIs (including 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 a
> dialog asking users to grant permission and allows the speech APIs to
> be used from the process.
>
> Added change to Emacs 31 NEWS. If there's any chance the permission
> can make it to 30, I'd be happy to rework the patch as needed.
>
> Cheers,

What speech recognition services exist on Free (GNU/Linux) systems, and
do they require like intervention on our part to function in Emacs?





^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#72827: [PATCH] Adds NSSpeechRecognitionUsageDescription to Info.plist.in
  2024-08-29  0:57 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2024-08-29  5:05   ` Eli Zaretskii
  2024-08-29  7:07     ` Alvaro Ramirez
  0 siblings, 1 reply; 10+ messages in thread
From: Eli Zaretskii @ 2024-08-29  5:05 UTC (permalink / raw)
  To: Po Lu; +Cc: copyright-clerk, alvaro, 72827

> Cc: copyright-clerk@fsf.org, 72827@debbugs.gnu.org
> Date: Thu, 29 Aug 2024 08:57:25 +0800
> From:  Po Lu via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
> 
> Alvaro Ramirez <alvaro@xenodium.com> writes:
> 
> > Here's a tiny patch to add NSSpeechRecognitionUsageDescription to
> > Info.plist.in.
> >
> > Without NSSpeechRecognitionUsageDescription, we cannot launch
> > processes that use macOS's speech recognition APIs (including 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 a
> > dialog asking users to grant permission and allows the speech APIs to
> > be used from the process.
> >
> > Added change to Emacs 31 NEWS. If there's any chance the permission
> > can make it to 30, I'd be happy to rework the patch as needed.
> >
> > Cheers,
> 
> What speech recognition services exist on Free (GNU/Linux) systems, and
> do they require like intervention on our part to function in Emacs?

Can you explain why this question is relevant to the patch?

AFAIU, the patch does not invoke any services nor adds any features to
Emacs, it just avoids interfering with existing system features.  IOW,
it makes Emacs behave according to the platform requirements and
conventions.





^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#72827: [PATCH] Adds NSSpeechRecognitionUsageDescription to Info.plist.in
  2024-08-29  5:05   ` Eli Zaretskii
@ 2024-08-29  7:07     ` Alvaro Ramirez
  0 siblings, 0 replies; 10+ messages in thread
From: Alvaro Ramirez @ 2024-08-29  7:07 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Po Lu, copyright-clerk, 72827

Eli Zaretskii <eliz@gnu.org> writes:

>> Cc: copyright-clerk@fsf.org, 72827@debbugs.gnu.org
>> Date: Thu, 29 Aug 2024 08:57:25 +0800
>> From:  Po Lu via "Bug reports for GNU Emacs,
>>  the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
>> 
>> Alvaro Ramirez <alvaro@xenodium.com> writes:
>> 
>> > Here's a tiny patch to add 
>> > NSSpeechRecognitionUsageDescription to
>> > Info.plist.in.
>> >
>> > Without NSSpeechRecognitionUsageDescription, we cannot launch
>> > processes that use macOS's speech recognition APIs (including 
>> > 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 a
>> > dialog asking users to grant permission and allows the speech 
>> > APIs to
>> > be used from the process.
>> >
>> > Added change to Emacs 31 NEWS. If there's any chance the 
>> > permission
>> > can make it to 30, I'd be happy to rework the patch as 
>> > needed.
>> >
>> > Cheers,
>> 
>> What speech recognition services exist on Free (GNU/Linux) 
>> systems, and
>> do they require like intervention on our part to function in 
>> Emacs?
>
> Can you explain why this question is relevant to the patch?
>
> AFAIU, the patch does not invoke any services nor adds any 
> features to
> Emacs, it just avoids interfering with existing system features. 
> IOW,
> it makes Emacs behave according to the platform requirements and
> conventions.

Correct. No feature added. Purely host OS permission 
integration. If macOS determines the user must be asked for this 
permission to run a process, the patch enables the permission 
request to surface to the user. Without the patch, the process 
just fails (terminated by the OS).





^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#72827: [PATCH] Adds NSSpeechRecognitionUsageDescription to Info.plist.in
  2024-08-27  9:12 bug#72827: [PATCH] Adds NSSpeechRecognitionUsageDescription to Info.plist.in Alvaro Ramirez
  2024-08-29  0:57 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2024-08-30  8:10 ` Stefan Kangas
  2024-08-30  9:18   ` Alvaro Ramirez
  1 sibling, 1 reply; 10+ messages in thread
From: Stefan Kangas @ 2024-08-30  8:10 UTC (permalink / raw)
  To: Alvaro Ramirez, 72827

Alvaro Ramirez <alvaro@xenodium.com> writes:

> ps. My copyright assignment paperwork has been is
> submitted. Awaiting copyright-clerk reply.

Thanks for your contributions to Emacs.

> 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 <https://www.gnu.org/licenses/>.
>          <string>Emacs requires permission to access the Downloads folder.</string>
>          <key>NSRemovableVolumesUsageDescription</key>
>          <string>Emacs requires permission to access files on Removable Volumes.</string>
> +        <key>NSSpeechRecognitionUsageDescription</key>
> +        <string>Emacs requires permission to handle any speech recognition.</string>

The Apple documentation[1] says that:

    A message that tells the user why the app is requesting to send user
    data to Apple’s speech recognition servers.

So I think the description should make it clear that this has privacy
implications, for example by saying something like "Emacs requires
permission to to send user data to Apple’s speech recognition servers".
The text in NEWS should also be changed accordingly.

It's fine that the user is asked, instead of the process just getting
silently terminated, but we do have to give the user enough information
to make an informed choice here.

Since this has potential privacy (and security?) implications, I think
this should go to master.

>  </dict>
>  </plist>
> --
> 2.39.3 (Apple Git-146)

[1] https://developer.apple.com/documentation/bundleresources/information_property_list/nsspeechrecognitionusagedescription





^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#72827: [PATCH] Adds NSSpeechRecognitionUsageDescription to Info.plist.in
  2024-08-30  8:10 ` Stefan Kangas
@ 2024-08-30  9:18   ` Alvaro Ramirez
  2024-08-30 16:08     ` Stefan Kangas
  0 siblings, 1 reply; 10+ messages in thread
From: Alvaro Ramirez @ 2024-08-30  9:18 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: 72827

[-- Attachment #1: Type: text/plain, Size: 1873 bytes --]

Thanks Stefan

Stefan Kangas <stefankangas@gmail.com> writes:

> Alvaro Ramirez <alvaro@xenodium.com> writes:
>
>> ps. My copyright assignment paperwork has been is
>> submitted. Awaiting copyright-clerk reply.
>
> Thanks for your contributions to Emacs.
>
>
> The Apple documentation[1] says that:
>
>     A message that tells the user why the app is requesting to 
>     send user
>     data to Apple’s speech recognition servers.
>
> So I think the description should make it clear that this has 
> privacy
> implications, for example by saying something like "Emacs 
> requires
> permission to to send user data to Apple’s speech recognition 
> servers".

Indeed. That notice is already part of the system dialog 
itself. The full text looks as follows:

---
"Emacs.app" Would Like to
Access Speech Recognition.

Speech data from this app will be sent to
Apple to process your requests. This will
also help Apple improve its speech
recognition technology.

Emacs requires permission to handle any
speech recognition.

[Don't Allow] [Allow]
---

Also attaching a screenshot.

> The text in NEWS should also be changed accordingly.

Sounds good. Will update NEWS.

>
> It's fine that the user is asked, instead of the process just 
> getting
> silently terminated, but we do have to give the user enough 
> information
> to make an informed choice here.

Makes sense. The system dialog already includes these details, but 
happy to modify text in our control further if we still reckon 
it's needed.
>
> Since this has potential privacy (and security?) implications, I 
> think
> this should go to master.
>
>>  </dict>
>>  </plist>
>> --
>> 2.39.3 (Apple Git-146)
>
> [1] 
> https://developer.apple.com/documentation/bundleresources/information_property_list/nsspeechrecognitionusagedescription

[-- Attachment #2: speechrec-permission-dialog.png --]
[-- Type: image/png, Size: 262751 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#72827: [PATCH] Adds NSSpeechRecognitionUsageDescription to Info.plist.in
  2024-08-30  9:18   ` Alvaro Ramirez
@ 2024-08-30 16:08     ` Stefan Kangas
  2024-08-30 17:45       ` Alvaro Ramirez
  0 siblings, 1 reply; 10+ messages in thread
From: Stefan Kangas @ 2024-08-30 16:08 UTC (permalink / raw)
  To: Alvaro Ramirez; +Cc: 72827

Alvaro Ramirez <alvaro@xenodium.com> writes:

> Makes sense. The system dialog already includes these details, but
> happy to modify text in our control further if we still reckon
> it's needed.

Since this is already displayed by the system, I think changing the NEWS
entry is enough.  Thanks again.





^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#72827: [PATCH] Adds NSSpeechRecognitionUsageDescription to Info.plist.in
  2024-08-30 16:08     ` Stefan Kangas
@ 2024-08-30 17:45       ` Alvaro Ramirez
  2024-08-31 10:39         ` Eli Zaretskii
  0 siblings, 1 reply; 10+ messages in thread
From: Alvaro Ramirez @ 2024-08-30 17:45 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: 72827

[-- Attachment #1: Type: text/plain, Size: 441 bytes --]

Thanks Stefan

Stefan Kangas <stefankangas@gmail.com> writes:

> Alvaro Ramirez <alvaro@xenodium.com> writes:
>
>> Makes sense. The system dialog already includes these details, 
>> but
>> happy to modify text in our control further if we still reckon
>> it's needed.
>
> Since this is already displayed by the system, I think changing 
> the NEWS
> entry is enough.  Thanks again.

Sounds good. I've updated NEWS and attached a new patch.


[-- Attachment #2: 0002-Adds-NSSpeechRecognitionUsageDescription-to-Info-plist-in.patch --]
[-- Type: text/x-patch, Size: 2151 bytes --]

From 9db2c2ad848668389adeb80dd211bf700e4d5520 Mon Sep 17 00:00:00 2001
From: xenodium <me+gh@xenodium.com>
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                         | 9 +++++++++
 nextstep/templates/Info.plist.in | 2 ++
 2 files changed, 11 insertions(+)

diff --git a/etc/NEWS b/etc/NEWS
index c5040776a73..8b398b5f8ef 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -43,6 +43,15 @@ 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.
+
+Note: Accepting this permission allows the use of system APIs, which may
+send user data to Apple’s speech recognition servers.
+
 ** 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 <https://www.gnu.org/licenses/>.
         <string>Emacs requires permission to access the Downloads folder.</string>
         <key>NSRemovableVolumesUsageDescription</key>
         <string>Emacs requires permission to access files on Removable Volumes.</string>
+        <key>NSSpeechRecognitionUsageDescription</key>
+        <string>Emacs requires permission to handle any speech recognition.</string>
 </dict>
 </plist>
-- 
2.39.3 (Apple Git-146)


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* bug#72827: [PATCH] Adds NSSpeechRecognitionUsageDescription to Info.plist.in
  2024-08-30 17:45       ` Alvaro Ramirez
@ 2024-08-31 10:39         ` Eli Zaretskii
  2024-08-31 11:05           ` Alvaro Ramirez
  0 siblings, 1 reply; 10+ messages in thread
From: Eli Zaretskii @ 2024-08-31 10:39 UTC (permalink / raw)
  To: Alvaro Ramirez; +Cc: 72827-done, stefankangas

> Cc: 72827@debbugs.gnu.org
> From: Alvaro Ramirez <alvaro@xenodium.com>
> Date: Fri, 30 Aug 2024 18:45:52 +0100
> 
> Stefan Kangas <stefankangas@gmail.com> writes:
> 
> > Alvaro Ramirez <alvaro@xenodium.com> writes:
> >
> >> Makes sense. The system dialog already includes these details, 
> >> but
> >> happy to modify text in our control further if we still reckon
> >> it's needed.
> >
> > Since this is already displayed by the system, I think changing 
> > the NEWS
> > entry is enough.  Thanks again.
> 
> Sounds good. I've updated NEWS and attached a new patch.

Thanks, installed on the master branch, and closing the bug.





^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#72827: [PATCH] Adds NSSpeechRecognitionUsageDescription to Info.plist.in
  2024-08-31 10:39         ` Eli Zaretskii
@ 2024-08-31 11:05           ` Alvaro Ramirez
  0 siblings, 0 replies; 10+ messages in thread
From: Alvaro Ramirez @ 2024-08-31 11:05 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 72827-done, stefankangas

Eli Zaretskii <eliz@gnu.org> writes:

>> Cc: 72827@debbugs.gnu.org
>> From: Alvaro Ramirez <alvaro@xenodium.com>
>> Date: Fri, 30 Aug 2024 18:45:52 +0100
>> 
>> Stefan Kangas <stefankangas@gmail.com> writes:
>> 
>> > Alvaro Ramirez <alvaro@xenodium.com> writes:
>> >
>> >> Makes sense. The system dialog already includes these 
>> >> details, 
>> >> but
>> >> happy to modify text in our control further if we still 
>> >> reckon
>> >> it's needed.
>> >
>> > Since this is already displayed by the system, I think 
>> > changing 
>> > the NEWS
>> > entry is enough.  Thanks again.
>> 
>> Sounds good. I've updated NEWS and attached a new patch.
>
> Thanks, installed on the master branch, and closing the bug.

Thanks Eli!





^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2024-08-31 11:05 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-27  9:12 bug#72827: [PATCH] Adds NSSpeechRecognitionUsageDescription to Info.plist.in Alvaro Ramirez
2024-08-29  0:57 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-08-29  5:05   ` Eli Zaretskii
2024-08-29  7:07     ` Alvaro Ramirez
2024-08-30  8:10 ` Stefan Kangas
2024-08-30  9:18   ` Alvaro Ramirez
2024-08-30 16:08     ` Stefan Kangas
2024-08-30 17:45       ` Alvaro Ramirez
2024-08-31 10:39         ` Eli Zaretskii
2024-08-31 11:05           ` Alvaro Ramirez

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.