Voice-to-text dictation app with local (Nvidia Parakeet/Whisper) and cloud models (BYOK). Privacy-first and available cross-platform.
JavaScript aianthropiccross-platformgeminigroqlinuxmacosnvidiaopen-sourceopenaiparakeetspeech-to-texttranscribewhisperwindows
const WEEKDAYS = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];
const MONTHS = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
const DAY_MS = 86_400_000;
const startOfDay = (date: Date): number =>
new Date(date.getFullYear(), date.getMonth(), date.getDate()).getTime();
export function formatConversationTime(timestamp: number, now: Date = new Date()): string {
const date = new Date(timestamp);
// Compare calendar days, not 24 h spans, so 11 pm yesterday still reads "Yesterday".
const daysAgo = Math.round((startOfDay(now) - startOfDay(date)) / DAY_MS);
if (daysAgo <= 0) {
const hours = date.getHours() % 12 || 12;
const minutes = String(date.getMinutes()).padStart(2, '0');
return `${hours}:${minutes} ${date.getHours() < 12 ? 'AM' : 'PM'}`;
}
if (daysAgo === 1) return 'Yesterday';
if (daysAgo <= 6) return WEEKDAYS[date.getDay()];
const day = `${MONTHS[date.getMonth()]} ${date.getDate()}`;
return date.getFullYear() === now.getFullYear() ? day : `${day}, ${date.getFullYear()}`;
}