Skip to content

Commit b89e75e

Browse files
committed
remove speaker mute
1 parent 257cbb9 commit b89e75e

File tree

14 files changed

+51
-239
lines changed

14 files changed

+51
-239
lines changed

apps/desktop/src/components/main/body/sessions/outer-header/in-meeting-indicator.tsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,15 @@ export function InMeetingIndicator({ sessionId }: { sessionId: string }) {
4343
? (
4444
<div className="flex items-center gap-1.5">
4545
<MicOff size={14} />
46+
<SoundIndicator
47+
value={[amplitude.mic, amplitude.speaker]}
48+
color="#ef4444"
49+
size="long"
50+
height={16}
51+
width={32}
52+
stickWidth={2}
53+
gap={1}
54+
/>
4655
</div>
4756
)
4857
: (

plugins/listener/build.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ const COMMANDS: &[&str] = &[
44
"set_microphone_device",
55
"get_mic_muted",
66
"set_mic_muted",
7-
"get_speaker_muted",
8-
"set_speaker_muted",
97
"start_session",
108
"stop_session",
119
"get_state",

plugins/listener/js/bindings.gen.ts

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -47,22 +47,6 @@ async setMicMuted(muted: boolean) : Promise<Result<null, string>> {
4747
else return { status: "error", error: e as any };
4848
}
4949
},
50-
async getSpeakerMuted() : Promise<Result<boolean, string>> {
51-
try {
52-
return { status: "ok", data: await TAURI_INVOKE("plugin:listener|get_speaker_muted") };
53-
} catch (e) {
54-
if(e instanceof Error) throw e;
55-
else return { status: "error", error: e as any };
56-
}
57-
},
58-
async setSpeakerMuted(muted: boolean) : Promise<Result<null, string>> {
59-
try {
60-
return { status: "ok", data: await TAURI_INVOKE("plugin:listener|set_speaker_muted", { muted }) };
61-
} catch (e) {
62-
if(e instanceof Error) throw e;
63-
else return { status: "error", error: e as any };
64-
}
65-
},
6650
async startSession(params: SessionParams) : Promise<Result<null, string>> {
6751
try {
6852
return { status: "ok", data: await TAURI_INVOKE("plugin:listener|start_session", { params }) };
@@ -108,7 +92,7 @@ export type Alternatives = { transcript: string; words: Word[]; confidence: numb
10892
export type Channel = { alternatives: Alternatives[] }
10993
export type Metadata = { request_id: string; model_info: ModelInfo; model_uuid: string }
11094
export type ModelInfo = { name: string; version: string; arch: string }
111-
export type SessionEvent = { type: "inactive" } | { type: "running_active" } | { type: "audioAmplitude"; mic: number; speaker: number } | { type: "micMuted"; value: boolean } | { type: "speakerMuted"; value: boolean } | { type: "streamResponse"; response: StreamResponse }
95+
export type SessionEvent = { type: "inactive" } | { type: "running_active" } | { type: "audioAmplitude"; mic: number; speaker: number } | { type: "micMuted"; value: boolean } | { type: "streamResponse"; response: StreamResponse }
11296
export type SessionParams = { session_id: string; languages: string[]; onboarding: boolean; record_enabled: boolean; model: string; base_url: string; api_key: string; keywords: string[] }
11397
export type StreamResponse = { type: "Results"; start: number; duration: number; is_final: boolean; speech_final: boolean; from_finalize: boolean; channel: Channel; metadata: Metadata; channel_index: number[] } | { type: "Metadata"; request_id: string; created: string; duration: number; channels: number } | { type: "SpeechStarted"; channel: number[]; timestamp: number } | { type: "UtteranceEnd"; channel: number[]; last_word_end: number }
11498
export type Word = { word: string; start: number; end: number; confidence: number; speaker: number | null; punctuated_word: string | null; language: string | null }

plugins/listener/permissions/autogenerated/commands/get_speaker_muted.toml

Lines changed: 0 additions & 13 deletions
This file was deleted.

plugins/listener/permissions/autogenerated/commands/set_speaker_muted.toml

Lines changed: 0 additions & 13 deletions
This file was deleted.

plugins/listener/permissions/autogenerated/reference.md

Lines changed: 0 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ Default permissions for the plugin
1111
- `allow-stop-session`
1212
- `allow-get-mic-muted`
1313
- `allow-set-mic-muted`
14-
- `allow-get-speaker-muted`
15-
- `allow-set-speaker-muted`
1614
- `allow-get-state`
1715

1816
## Permission Table
@@ -79,32 +77,6 @@ Denies the get_mic_muted command without any pre-configured scope.
7977
<tr>
8078
<td>
8179

82-
`listener:allow-get-speaker-muted`
83-
84-
</td>
85-
<td>
86-
87-
Enables the get_speaker_muted command without any pre-configured scope.
88-
89-
</td>
90-
</tr>
91-
92-
<tr>
93-
<td>
94-
95-
`listener:deny-get-speaker-muted`
96-
97-
</td>
98-
<td>
99-
100-
Denies the get_speaker_muted command without any pre-configured scope.
101-
102-
</td>
103-
</tr>
104-
105-
<tr>
106-
<td>
107-
10880
`listener:allow-get-state`
10981

11082
</td>
@@ -235,32 +207,6 @@ Denies the set_microphone_device command without any pre-configured scope.
235207
<tr>
236208
<td>
237209

238-
`listener:allow-set-speaker-muted`
239-
240-
</td>
241-
<td>
242-
243-
Enables the set_speaker_muted command without any pre-configured scope.
244-
245-
</td>
246-
</tr>
247-
248-
<tr>
249-
<td>
250-
251-
`listener:deny-set-speaker-muted`
252-
253-
</td>
254-
<td>
255-
256-
Denies the set_speaker_muted command without any pre-configured scope.
257-
258-
</td>
259-
</tr>
260-
261-
<tr>
262-
<td>
263-
264210
`listener:allow-start-session`
265211

266212
</td>

plugins/listener/permissions/default.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,5 @@ permissions = [
88
"allow-stop-session",
99
"allow-get-mic-muted",
1010
"allow-set-mic-muted",
11-
"allow-get-speaker-muted",
12-
"allow-set-speaker-muted",
1311
"allow-get-state",
1412
]

plugins/listener/permissions/schemas/schema.json

Lines changed: 2 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -318,18 +318,6 @@
318318
"const": "deny-get-mic-muted",
319319
"markdownDescription": "Denies the get_mic_muted command without any pre-configured scope."
320320
},
321-
{
322-
"description": "Enables the get_speaker_muted command without any pre-configured scope.",
323-
"type": "string",
324-
"const": "allow-get-speaker-muted",
325-
"markdownDescription": "Enables the get_speaker_muted command without any pre-configured scope."
326-
},
327-
{
328-
"description": "Denies the get_speaker_muted command without any pre-configured scope.",
329-
"type": "string",
330-
"const": "deny-get-speaker-muted",
331-
"markdownDescription": "Denies the get_speaker_muted command without any pre-configured scope."
332-
},
333321
{
334322
"description": "Enables the get_state command without any pre-configured scope.",
335323
"type": "string",
@@ -390,18 +378,6 @@
390378
"const": "deny-set-microphone-device",
391379
"markdownDescription": "Denies the set_microphone_device command without any pre-configured scope."
392380
},
393-
{
394-
"description": "Enables the set_speaker_muted command without any pre-configured scope.",
395-
"type": "string",
396-
"const": "allow-set-speaker-muted",
397-
"markdownDescription": "Enables the set_speaker_muted command without any pre-configured scope."
398-
},
399-
{
400-
"description": "Denies the set_speaker_muted command without any pre-configured scope.",
401-
"type": "string",
402-
"const": "deny-set-speaker-muted",
403-
"markdownDescription": "Denies the set_speaker_muted command without any pre-configured scope."
404-
},
405381
{
406382
"description": "Enables the start_session command without any pre-configured scope.",
407383
"type": "string",
@@ -427,10 +403,10 @@
427403
"markdownDescription": "Denies the stop_session command without any pre-configured scope."
428404
},
429405
{
430-
"description": "Default permissions for the plugin\n#### This default permission set includes:\n\n- `allow-list-microphone-devices`\n- `allow-get-current-microphone-device`\n- `allow-set-microphone-device`\n- `allow-start-session`\n- `allow-stop-session`\n- `allow-get-mic-muted`\n- `allow-set-mic-muted`\n- `allow-get-speaker-muted`\n- `allow-set-speaker-muted`\n- `allow-get-state`",
406+
"description": "Default permissions for the plugin\n#### This default permission set includes:\n\n- `allow-list-microphone-devices`\n- `allow-get-current-microphone-device`\n- `allow-set-microphone-device`\n- `allow-start-session`\n- `allow-stop-session`\n- `allow-get-mic-muted`\n- `allow-set-mic-muted`\n- `allow-get-state`",
431407
"type": "string",
432408
"const": "default",
433-
"markdownDescription": "Default permissions for the plugin\n#### This default permission set includes:\n\n- `allow-list-microphone-devices`\n- `allow-get-current-microphone-device`\n- `allow-set-microphone-device`\n- `allow-start-session`\n- `allow-stop-session`\n- `allow-get-mic-muted`\n- `allow-set-mic-muted`\n- `allow-get-speaker-muted`\n- `allow-set-speaker-muted`\n- `allow-get-state`"
409+
"markdownDescription": "Default permissions for the plugin\n#### This default permission set includes:\n\n- `allow-list-microphone-devices`\n- `allow-get-current-microphone-device`\n- `allow-set-microphone-device`\n- `allow-start-session`\n- `allow-stop-session`\n- `allow-get-mic-muted`\n- `allow-set-mic-muted`\n- `allow-get-state`"
434410
}
435411
]
436412
}

plugins/listener/src/actors/session.rs

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,7 @@ use crate::{
1818
#[derive(Debug)]
1919
pub enum SessionMsg {
2020
SetMicMute(bool),
21-
SetSpeakerMute(bool),
2221
GetMicMute(RpcReplyPort<bool>),
23-
GetSpeakerMute(RpcReplyPort<bool>),
2422
GetMicDeviceName(RpcReplyPort<Option<String>>),
2523
ChangeMicDevice(Option<String>),
2624
}
@@ -103,14 +101,6 @@ impl Actor for SessionActor {
103101
SessionEvent::MicMuted { value: muted }.emit(&state.app)?;
104102
}
105103

106-
SessionMsg::SetSpeakerMute(muted) => {
107-
if let Some(cell) = registry::where_is(SourceActor::name()) {
108-
let actor: ActorRef<SourceMsg> = cell.into();
109-
actor.cast(SourceMsg::SetSpkMute(muted))?;
110-
}
111-
SessionEvent::SpeakerMuted { value: muted }.emit(&state.app)?;
112-
}
113-
114104
SessionMsg::GetMicDeviceName(reply) => {
115105
if !reply.is_closed() {
116106
let device_name = if let Some(cell) = registry::where_is(SourceActor::name()) {
@@ -137,19 +127,6 @@ impl Actor for SessionActor {
137127
}
138128
}
139129

140-
SessionMsg::GetSpeakerMute(reply) => {
141-
let muted = if let Some(cell) = registry::where_is(SourceActor::name()) {
142-
let actor: ActorRef<SourceMsg> = cell.into();
143-
call_t!(actor, SourceMsg::GetSpkMute, 100)?
144-
} else {
145-
false
146-
};
147-
148-
if !reply.is_closed() {
149-
let _ = reply.send(muted);
150-
}
151-
}
152-
153130
SessionMsg::ChangeMicDevice(device) => {
154131
if let Some(cell) = registry::where_is(SourceActor::name()) {
155132
let actor: ActorRef<SourceMsg> = cell.into();

0 commit comments

Comments
 (0)