Revert "Read Aloud: Disable local voices on macOS 27"

This reverts commit ca61760225.

We're now patching libmozglue to fix this.
This commit is contained in:
Dan Stillman 2026-10-01 16:45:52 -04:00
parent a8411d11ab
commit d3b87ca709
3 changed files with 2 additions and 14 deletions

View file

@ -17,7 +17,7 @@ var Zotero_Read_Aloud_First_Run = new function () {
};
this._createReadAloudFirstRun = function () {
let { lang, readAloudEnabledVoices, ftl, getReadAloudRemoteInterface, readAloudLocalVoicesUnavailable } = io.dataIn;
let { lang, readAloudEnabledVoices, ftl, getReadAloudRemoteInterface } = io.dataIn;
let browserWindow = this._iframe.contentWindow;
browserWindow.wrappedJSObject.createReadAloudFirstRun(Cu.cloneInto({
@ -26,7 +26,6 @@ var Zotero_Read_Aloud_First_Run = new function () {
ftl,
loggedIn: Zotero.Sync.Runner.enabled,
remoteInterface: getReadAloudRemoteInterface(browserWindow),
readAloudLocalVoicesUnavailable,
onOpenLink: (url) => {
let win = Services.wm.getMostRecentWindow('navigator:browser');
if (win) {

View file

@ -14,7 +14,7 @@ var Zotero_Read_Aloud_Voices = new function () {
};
this._createReadAloudVoices = function () {
let { lang, tier, readAloudEnabledVoices, ftl, getReadAloudRemoteInterface, readAloudLocalVoicesUnavailable } = io.dataIn;
let { lang, tier, readAloudEnabledVoices, ftl, getReadAloudRemoteInterface } = io.dataIn;
let browserWindow = this._iframe.contentWindow;
browserWindow.wrappedJSObject.createReadAloudVoices(Cu.cloneInto({
@ -23,7 +23,6 @@ var Zotero_Read_Aloud_Voices = new function () {
readAloudEnabledVoices,
ftl,
remoteInterface: getReadAloudRemoteInterface(browserWindow),
readAloudLocalVoicesUnavailable,
onOpenLink: (url) => {
let win = Services.wm.getMostRecentWindow('navigator:browser');
if (win) {

View file

@ -43,13 +43,6 @@ const ARRAYBUFFER_MAX_LENGTH = Services.appinfo.is64Bit
const READ_ALOUD_ENABLED_VOICES_PATH = PathUtils.join(Zotero.Profile.dir, 'readAloudEnabledVoices.json');
const READ_ALOUD_VOICE_DEFAULTS_PATH = PathUtils.join(Zotero.Profile.dir, 'readAloudVoiceDefaults.json');
// TEMP: Local voices make loud pops at the end of every utterance on macOS 27
// without a patch to libmozglue (a64e3671) that would be risky to backport, so
// disable them.
function areReadAloudLocalVoicesUnavailable() {
return Zotero.isMac && parseInt(Services.sysinfo.getProperty('version')) === 27;
}
// Whether the Read Aloud audio cache has been pruned of stale versions this session
let readAloudCachePruned = false;
@ -272,7 +265,6 @@ class ReaderInstance {
readAloudVoices: this._getReadAloudVoices(),
readAloudEnabledVoices: await this._getReadAloudEnabledVoices(),
readAloudRemoteInterface: this._getReadAloudRemoteInterface(this._iframeWindow),
readAloudLocalVoicesUnavailable: areReadAloudLocalVoicesUnavailable(),
readAloudHighlightGranularity: Zotero.Prefs.get('reader.readAloud.highlightGranularity'),
getSDTPack: this._createGetSDTPack(this._iframeWindow),
loggedIn: Zotero.Sync.Runner.enabled,
@ -1910,7 +1902,6 @@ class ReaderInstance {
readAloudEnabledVoices: await this._getReadAloudEnabledVoices(),
ftl,
getReadAloudRemoteInterface: win => this._getReadAloudRemoteInterface(win),
readAloudLocalVoicesUnavailable: areReadAloudLocalVoicesUnavailable(),
},
dataOut: null,
openVoicesDialog: ({ tier }) => {
@ -1941,7 +1932,6 @@ class ReaderInstance {
readAloudEnabledVoices: await this._getReadAloudEnabledVoices(),
ftl,
getReadAloudRemoteInterface: win => this._getReadAloudRemoteInterface(win),
readAloudLocalVoicesUnavailable: areReadAloudLocalVoicesUnavailable(),
},
dataOut: null,
};