import { useEffect, useState } from 'react'; import type { PublicConfig } from '../../shared/types.ts'; import { OUTPUT_HEIGHTS } from '../../shared/types.ts'; import { api } from '../api.ts'; import { Icon } from '../components/Icon.tsx'; export function Settings() { const [cfg, setCfg] = useState(null); const [key, setKey] = useState(''); const [status, setStatus] = useState(null); const [error, setError] = useState(null); const load = () => api.config().then(setCfg).catch((e) => setError(e.message)); useEffect(() => { document.title = 'Settings · Takes'; load(); }, []); const save = async (patch: Record) => { try { await api.saveConfig(patch); await load(); setStatus('Saved'); setTimeout(() => setStatus(null), 1500); } catch (e) { setError((e as Error).message); } }; if (!cfg) return
{error ?? 'Loading…'}
; return (
Videos
Settings
{status && {status}}
{error &&
{error}
}

Library

Videos are stored in {cfg.libraryDir}. Start the app with --dir to use another directory.

Transcription (Deepgram)

The key is stored in config.json in the library directory, readable only by you. Audio is sent to Deepgram only when a take is transcribed.

setKey(e.target.value)} /> {cfg.hasDeepgramKey && ( )}

Background removal

By default the camera background is removed on this computer’s CPU. To use a machine with an NVIDIA GPU instead, enter its ssh destination (for example office or user@host). It must accept key-based login without a password prompt and have Python 3.10 or later and ffmpeg; the first job installs onnxruntime-gpu in ~/.cache/takes/venv there. Each camera track is copied to that machine for processing and then deleted from it.

Defaults

The recorder remembers your last choices; these defaults apply until you change them there.

); }