Cthulhu is no longer a fork. Now it is a screen reader written in Golang.

This commit is contained in:
Storm Dragon committed 2026-10-14 00:16:34 -04:00
1 parent a998fe67de
commit 069fc674dc
708 files changed
+112482 -532

No files matched your search

+27
View File
@@ -0,0 +1,27 @@
// Copyright (c) 2026 Storm Dragon
// Authors: Storm Dragon, Angus Kola
// SPDX-License-Identifier: GPL-3.0-or-later
package config
// EffectiveVoice resolves a sparse voice over Default. Uppercase retains the
// established pitch of 7 unless the user explicitly chooses another pitch.
func EffectiveVoice(settings Settings, kind string) Voice {
voice := cloneVoice(settings.DefaultVoice)
var override Voice
switch kind {
case "uppercase":
pitch := 7.0
if voice.AveragePitch != nil {
pitch = min(9, max(pitch, *voice.AveragePitch+2))
}
voice.AveragePitch = &pitch
override = settings.UppercaseVoice
case "hyperlink":
override = settings.HyperlinkVoice
case "system":
override = settings.SystemVoice
}
mergeVoice(&voice, cloneVoice(override))
return voice
}