Skip to content

YC (S26) | Open Computer History | Continuously record your company computer work, map your workflows, help you find work worth automating, and power your agents' context

release-app: fix screenpipe-cloud transcription engine

Louis Beaumont9cc26f904820
diff --git a/screenpipe-app-tauri/components/settings/recording-settings.tsx b/screenpipe-app-tauri/components/settings/recording-settings.tsx
index 263120251..873d7f6a8 100644
--- a/screenpipe-app-tauri/components/settings/recording-settings.tsx
+++ b/screenpipe-app-tauri/components/settings/recording-settings.tsx
@@ -924,6 +924,33 @@ export function RecordingSettings() {
<h3 className="text-lg font-semibold">Audio Transcription</h3>
</div>
<div className="space-y-4">
+ {/* Screenpipe Cloud Subscription Status */}
+ {settings.user && (
+ <div className="flex items-center justify-between p-3 rounded-lg border bg-secondary/20 border-secondary/50">
+ <div className="flex items-center gap-2">
+ <div className={cn(
+ "h-2 w-2 rounded-full",
+ settings.user.cloud_subscribed ? "bg-foreground" : "bg-muted-foreground"
+ )} />
+ <span className="text-sm text-muted-foreground">
+ Screenpipe Cloud: {settings.user.cloud_subscribed ? "Subscribed" : "Not subscribed"}
+ </span>
+ </div>
+ {!settings.user.cloud_subscribed && (
+ <Button
+ variant="outline"
+ size="sm"
+ onClick={() => {
+ const clientRefId = `${settings.user?.id}&customer_email=${encodeURIComponent(settings.user?.email ?? "")}`;
+ openUrl(`https://buy.stripe.com/7sIdRzbym4RA98c7sX?client_reference_id=${clientRefId}`);
+ }}
+ >
+ Subscribe
+ </Button>
+ )}
+ </div>
+ )}
+
<div className="flex flex-col space-y-2">
<Label htmlFor="audioTranscriptionEngine" className="flex items-center space-x-2">
<span>Audio transcription engine</span>
@@ -949,44 +976,9 @@ export function RecordingSettings() {
<SelectValue placeholder="Select transcription engine" />
</SelectTrigger>
<SelectContent>
- <SelectItem value="screenpipe-cloud">Screenpipe Cloud</SelectItem>
- <SelectItem value="whisper-tiny">Whisper Tiny</SelectItem>
- <SelectItem value="whisper-tiny-quantized">Whisper Tiny Quantized</SelectItem>
- <SelectItem value="whisper-large">Whisper Large V3</SelectItem>
- <SelectItem value="whisper-large-quantized">Whisper Large V3 Quantized</SelectItem>
- <SelectItem value="whisper-large-v3-turbo">Whisper Large V3 Turbo</SelectItem>
- <SelectItem value="whisper-large-v3-turbo-quantized">Whisper Large V3 Turbo Quantized</SelectItem>
- <SelectItem value="deepgram">Deepgram</SelectItem>
- </SelectContent>
- </Select>
- </div>
-
- {/* Realtime Transcription */}
- <div className="flex flex-col space-y-2">
- <Label htmlFor="realtimeAudioTranscriptionEngine" className="flex items-center space-x-2">
- <span>Realtime audio transcription engine</span>
- <TooltipProvider>
- <Tooltip>
- <TooltipTrigger>
- <HelpCircle className="h-4 w-4 cursor-default" />
- </TooltipTrigger>
- <TooltipContent side="right">
- <p>
- Engine used for real-time transcription. This can be different from the main transcription engine.
- </p>
- </TooltipContent>
- </Tooltip>
- </TooltipProvider>
- </Label>
- <Select
- value={settings.realtimeAudioTranscriptionEngine}
- onValueChange={(value) => handleAudioTranscriptionModelChange(value, true)}
- >
- <SelectTrigger>
- <SelectValue placeholder="Select realtime transcription engine" />
- </SelectTrigger>
- <SelectContent>
- <SelectItem value="screenpipe-cloud">Screenpipe Cloud</SelectItem>
+ <SelectItem value="screenpipe-cloud" disabled={!settings.user?.cloud_subscribed}>
+ Screenpipe Cloud {!settings.user?.cloud_subscribed && "(requires subscription)"}
+ </SelectItem>
<SelectItem value="whisper-tiny">Whisper Tiny</SelectItem>
<SelectItem value="whisper-tiny-quantized">Whisper Tiny Quantized</SelectItem>
<SelectItem value="whisper-large">Whisper Large V3</SelectItem>
diff --git a/screenpipe-app-tauri/src-tauri/src/sidecar.rs b/screenpipe-app-tauri/src-tauri/src/sidecar.rs
index 477496c6d..9af1f1aa3 100644
--- a/screenpipe-app-tauri/src-tauri/src/sidecar.rs
+++ b/screenpipe-app-tauri/src-tauri/src/sidecar.rs
@@ -473,21 +473,16 @@ async fn spawn_sidecar(app: &tauri::AppHandle, override_args: Option<Vec<String>
c = c.env("HF_ENDPOINT", "https://hf-mirror.com");
}
- // if a user with credits is provided, add the AI proxy env var api url for deepgram as env var https://ai-proxy.i-f9f.workers.dev/v1/listen
- if user.cloud_subscribed.is_some()
- && (deepgram_api_key == "default" || deepgram_api_key == "")
- {
+ // Use screenpipe cloud proxy when screenpipe-cloud engine is selected
+ if audio_transcription_engine == "screenpipe-cloud" && user.id.is_some() {
c = c.env(
"DEEPGRAM_API_URL",
"https://ai-proxy.i-f9f.workers.dev/v1/listen",
);
c = c.env("DEEPGRAM_WEBSOCKET_URL", "wss://ai-proxy.i-f9f.workers.dev");
- // Add token if screenpipe-cloud is selected and user has a token
- if user.id.is_some() {
- c = c.env("CUSTOM_DEEPGRAM_API_TOKEN", user.id.as_ref().unwrap());
- args.push("--deepgram-api-key");
- args.push(user.id.as_ref().unwrap());
- }
+ c = c.env("CUSTOM_DEEPGRAM_API_TOKEN", user.id.as_ref().unwrap());
+ args.push("--deepgram-api-key");
+ args.push(user.id.as_ref().unwrap());
}
c = c.env("SENTRY_RELEASE_NAME_APPEND", "tauri");
@@ -514,11 +509,10 @@ async fn spawn_sidecar(app: &tauri::AppHandle, override_args: Option<Vec<String>
c = c.env("HF_ENDPOINT", "https://hf-mirror.com");
}
- // if a user with credits is provided, add the AI proxy env var api url for deepgram as env var https://ai-proxy.i-f9f.workers.dev/v1/listen
- if user.cloud_subscribed.is_some() && (deepgram_api_key == "default" || deepgram_api_key == "")
- {
+ // Use screenpipe cloud proxy when screenpipe-cloud engine is selected
+ if audio_transcription_engine == "screenpipe-cloud" && user.id.is_some() {
info!(
- "Adding AI proxy env vars for deepgram: {:?}",
+ "Using screenpipe cloud with user id: {:?}",
user.id.as_ref().unwrap()
);
c = c.env(
@@ -526,12 +520,9 @@ async fn spawn_sidecar(app: &tauri::AppHandle, override_args: Option<Vec<String>
"https://ai-proxy.i-f9f.workers.dev/v1/listen",
);
c = c.env("DEEPGRAM_WEBSOCKET_URL", "wss://ai-proxy.i-f9f.workers.dev");
- // Add token if screenpipe-cloud is selected and user has a token
- if user.id.is_some() {
- c = c.env("CUSTOM_DEEPGRAM_API_TOKEN", user.id.as_ref().unwrap());
- args.push("--deepgram-api-key");
- args.push(user.id.as_ref().unwrap());
- }
+ c = c.env("CUSTOM_DEEPGRAM_API_TOKEN", user.id.as_ref().unwrap());
+ args.push("--deepgram-api-key");
+ args.push(user.id.as_ref().unwrap());
}
c = c.env("SENTRY_RELEASE_NAME_APPEND", "tauri");