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

feat(audio): add fluid start and stop cues

altic-dev3af3fc3bb556
diff --git a/Sources/Fluid/ContentView.swift b/Sources/Fluid/ContentView.swift
index aa9f808a..a8db967b 100644
--- a/Sources/Fluid/ContentView.swift
+++ b/Sources/Fluid/ContentView.swift
@@ -1824,6 +1824,7 @@ struct ContentView: View {
"Routing decision snapshot | activeMode=\(modeAtStop.rawValue) | rewrite=\(wasRewriteMode) | command=\(wasCommandMode) | overlay=\(NotchContentState.shared.mode.rawValue)",
source: "ContentView"
)
+ TranscriptionSoundPlayer.shared.playStopSound()
self.clearActiveRecordingMode()
diff --git a/Sources/Fluid/Persistence/SettingsStore.swift b/Sources/Fluid/Persistence/SettingsStore.swift
index 49a5a71e..80d9783e 100644
--- a/Sources/Fluid/Persistence/SettingsStore.swift
+++ b/Sources/Fluid/Persistence/SettingsStore.swift
@@ -1552,6 +1552,7 @@ final class SettingsStore: ObservableObject {
enum TranscriptionStartSound: String, CaseIterable, Identifiable, Codable {
case none
+ case fluidSfx0 = "fluid_sfx_0"
case fluidSfx1 = "fluid_sfx_1"
case fluidSfx2 = "fluid_sfx_2"
case fluidSfx3 = "fluid_sfx_3"
@@ -1564,6 +1565,7 @@ final class SettingsStore: ObservableObject {
var displayName: String {
switch self {
case .none: return "None"
+ case .fluidSfx0: return "Fluid SFX 0"
case .fluidSfx1: return "Fluid SFX 1"
case .fluidSfx2: return "Fluid SFX 2"
case .fluidSfx3: return "Fluid SFX 3"
@@ -1571,15 +1573,23 @@ final class SettingsStore: ObservableObject {
}
}
- var soundFileName: String? {
+ var startSoundFileName: String? {
switch self {
case .none: return nil
+ case .fluidSfx0: return "FV_start_0"
case .fluidSfx1: return "FV_start"
case .fluidSfx2: return "FV_start_2"
case .fluidSfx3: return "sfx_3"
case .fluidSfx4: return "sfx_4"
}
}
+
+ var stopSoundFileName: String? {
+ switch self {
+ case .fluidSfx0: return "FV_end_0"
+ case .none, .fluidSfx1, .fluidSfx2, .fluidSfx3, .fluidSfx4: return nil
+ }
+ }
}
var accentColorOption: AccentColorOption {
@@ -1641,7 +1651,7 @@ final class SettingsStore: ObservableObject {
guard let raw = self.defaults.string(forKey: Keys.transcriptionStartSound),
let option = TranscriptionStartSound(rawValue: raw)
else {
- return .fluidSfx4
+ return .fluidSfx0
}
return option
}
diff --git a/Sources/Fluid/Resources/FV_end_0.m4a b/Sources/Fluid/Resources/FV_end_0.m4a
new file mode 100644
index 00000000..6a4c74e8
Binary files /dev/null and b/Sources/Fluid/Resources/FV_end_0.m4a differ
diff --git a/Sources/Fluid/Resources/FV_start_0.m4a b/Sources/Fluid/Resources/FV_start_0.m4a
new file mode 100644
index 00000000..227b5650
Binary files /dev/null and b/Sources/Fluid/Resources/FV_start_0.m4a differ
diff --git a/Sources/Fluid/Services/TranscriptionSoundPlayer.swift b/Sources/Fluid/Services/TranscriptionSoundPlayer.swift
index e32ed829..28d67cdf 100644
--- a/Sources/Fluid/Services/TranscriptionSoundPlayer.swift
+++ b/Sources/Fluid/Services/TranscriptionSoundPlayer.swift
@@ -13,20 +13,26 @@ final class TranscriptionSoundPlayer {
func playStartSound() {
let selected = SettingsStore.shared.transcriptionStartSound
- guard let soundName = selected.soundFileName else { return }
+ guard let soundName = selected.startSoundFileName else { return }
+ self.play(soundName: soundName)
+ }
+
+ func playStopSound() {
+ let selected = SettingsStore.shared.transcriptionStartSound
+ guard let soundName = selected.stopSoundFileName else { return }
self.play(soundName: soundName)
}
/// Preview a specific sound at the current volume setting (used in Settings UI).
func playPreview(sound: SettingsStore.TranscriptionStartSound) {
- guard let soundName = sound.soundFileName else { return }
+ guard let soundName = sound.startSoundFileName else { return }
self.play(soundName: soundName)
}
/// Preview current sound at a specific volume (used when slider is released).
func playPreviewAtVolume(_ volume: Float) {
let selected = SettingsStore.shared.transcriptionStartSound
- guard let soundName = selected.soundFileName else { return }
+ guard let soundName = selected.startSoundFileName else { return }
self.play(soundName: soundName, overrideVolume: volume)
}
diff --git a/Sources/Fluid/UI/SettingsView.swift b/Sources/Fluid/UI/SettingsView.swift
index 4d2b0283..5ab7208b 100644
--- a/Sources/Fluid/UI/SettingsView.swift
+++ b/Sources/Fluid/UI/SettingsView.swift
@@ -280,7 +280,7 @@ struct SettingsView: View {
VStack(alignment: .leading, spacing: 2) {
Text("Transcription Sounds")
.font(.body)
- Text("Choose which sound plays when recording starts. Select None to disable.")
+ Text("Choose the sound cue for recording. Some cues include an end sound.")
.font(.subheadline)
.foregroundStyle(.secondary)
}
@@ -307,7 +307,7 @@ struct SettingsView: View {
VStack(alignment: .leading, spacing: 2) {
Text("Volume")
.font(.body)
- Text("Adjust the notification sound volume.")
+ Text("Adjust the recording sound cue volume.")
.font(.subheadline)
.foregroundStyle(.secondary)
}