Skip to content

Fastest and only macOS Dictation app with on-device STT and custom trained AI enhancement model. Windows, iOS testflight! Android, Linux waitlist open! A local Wispr Flow alternative. Follow https://x.com/fluidvoiceapp for more

test(dictionary): opt suites into the pronunciation flag

altic-dev9d47ec36df8c
diff --git a/Tests/FluidDictationIntegrationTests/AudioHardwareRecoveryTests.swift b/Tests/FluidDictationIntegrationTests/AudioHardwareRecoveryTests.swift
index d8e8b42c..b2d6d8e7 100644
--- a/Tests/FluidDictationIntegrationTests/AudioHardwareRecoveryTests.swift
+++ b/Tests/FluidDictationIntegrationTests/AudioHardwareRecoveryTests.swift
@@ -855,6 +855,20 @@ private final nonisolated class RecoveryInput: DirectCoreAudioInputControlling,
#if canImport(FluidVoice_Debug)
final class AudioRouteRecoveryIntegrationTests: XCTestCase {
+
+ // Pronunciation features are opt-in in the app; these tests exercise the enabled paths.
+ private var priorSharedFeaturesFlag: Any?
+
+ override func setUp() {
+ super.setUp()
+ self.priorSharedFeaturesFlag = UserDefaults.standard.object(forKey: "DictionarySharedFeatureMatcherEnabled")
+ UserDefaults.standard.set(true, forKey: "DictionarySharedFeatureMatcherEnabled")
+ }
+
+ override func tearDown() {
+ UserDefaults.standard.set(self.priorSharedFeaturesFlag, forKey: "DictionarySharedFeatureMatcherEnabled")
+ super.tearDown()
+ }
@MainActor
func testStartupTriesNewMicrophoneMissingFromDeviceCache() async throws {
try await withASRRecoveryFixture(queryDelay: 0) { fixture in
diff --git a/Tests/FluidDictationIntegrationTests/CustomDictionaryManualEntryTests.swift b/Tests/FluidDictationIntegrationTests/CustomDictionaryManualEntryTests.swift
index 3a4a0513..b4a677f5 100644
--- a/Tests/FluidDictationIntegrationTests/CustomDictionaryManualEntryTests.swift
+++ b/Tests/FluidDictationIntegrationTests/CustomDictionaryManualEntryTests.swift
@@ -9,6 +9,20 @@ import FluidAudio
@MainActor
final class CustomDictionaryManualEntryTests: XCTestCase {
+
+ // Pronunciation features are opt-in in the app; these tests exercise the enabled paths.
+ private var priorSharedFeaturesFlag: Any?
+
+ override func setUp() {
+ super.setUp()
+ self.priorSharedFeaturesFlag = UserDefaults.standard.object(forKey: "DictionarySharedFeatureMatcherEnabled")
+ UserDefaults.standard.set(true, forKey: "DictionarySharedFeatureMatcherEnabled")
+ }
+
+ override func tearDown() {
+ UserDefaults.standard.set(self.priorSharedFeaturesFlag, forKey: "DictionarySharedFeatureMatcherEnabled")
+ super.tearDown()
+ }
func testVoiceTrainingKeepsPronunciationWithoutEverydayTextAliases() async {
let filtered = await VoiceTrainingAliasFilter.filter(["but", "now", "right now"]) { _ in .checked([]) }
let entries = CustomDictionaryTrainingMerge.mergedEntries(
diff --git a/Tests/FluidDictationIntegrationTests/DictationE2ETests.swift b/Tests/FluidDictationIntegrationTests/DictationE2ETests.swift
index 8939f802..6a3e1b27 100644
--- a/Tests/FluidDictationIntegrationTests/DictationE2ETests.swift
+++ b/Tests/FluidDictationIntegrationTests/DictationE2ETests.swift
@@ -9,6 +9,20 @@ import XCTest
@MainActor
final class DictationE2ETests: XCTestCase {
+
+ // Pronunciation features are opt-in in the app; these tests exercise the enabled paths.
+ private var priorSharedFeaturesFlag: Any?
+
+ override func setUp() {
+ super.setUp()
+ self.priorSharedFeaturesFlag = UserDefaults.standard.object(forKey: "DictionarySharedFeatureMatcherEnabled")
+ UserDefaults.standard.set(true, forKey: "DictionarySharedFeatureMatcherEnabled")
+ }
+
+ override func tearDown() {
+ UserDefaults.standard.set(self.priorSharedFeaturesFlag, forKey: "DictionarySharedFeatureMatcherEnabled")
+ super.tearDown()
+ }
private let enableTranscriptionSoundsKey = "EnableTranscriptionSounds"
private let transcriptionStartSoundKey = "TranscriptionStartSound"
private let dictationPromptProfilesKey = "DictationPromptProfiles"