chore: bump version to 1.1.1
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "hearbit-ai",
|
"name": "hearbit-ai",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "1.1.0",
|
"version": "1.1.1",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"$schema": "https://schema.tauri.app/config/2",
|
"$schema": "https://schema.tauri.app/config/2",
|
||||||
"productName": "Hearbit AI",
|
"productName": "Hearbit AI",
|
||||||
"version": "1.1.0",
|
"version": "1.1.1",
|
||||||
"identifier": "com.hearbit-ai.desktop",
|
"identifier": "com.hearbit-ai.desktop",
|
||||||
"build": {
|
"build": {
|
||||||
"beforeDevCommand": "npm run dev",
|
"beforeDevCommand": "npm run dev",
|
||||||
|
|||||||
@@ -360,7 +360,8 @@ Thanks!`
|
|||||||
|
|
||||||
<div className="flex-1 flex h-full overflow-hidden relative">
|
<div className="flex-1 flex h-full overflow-hidden relative">
|
||||||
<div className="flex-1 flex flex-col h-full overflow-hidden relative">
|
<div className="flex-1 flex flex-col h-full overflow-hidden relative">
|
||||||
{view === 'recorder' && (
|
{/* Recorder - Persistent (Hidden via CSS to keep recording alive) */}
|
||||||
|
<div className="flex-1 flex flex-col h-full overflow-hidden" style={{ display: view === 'recorder' ? 'flex' : 'none' }}>
|
||||||
<Recorder
|
<Recorder
|
||||||
apiKey={apiKey}
|
apiKey={apiKey}
|
||||||
productId={productId}
|
productId={productId}
|
||||||
@@ -386,8 +387,9 @@ Thanks!`
|
|||||||
addToast={addToast}
|
addToast={addToast}
|
||||||
selectedModel={selectedModel}
|
selectedModel={selectedModel}
|
||||||
onModelChange={handleModelChange}
|
onModelChange={handleModelChange}
|
||||||
|
isVisible={view === 'recorder'}
|
||||||
/>
|
/>
|
||||||
)}
|
</div>
|
||||||
|
|
||||||
{view === 'transcription' && (
|
{view === 'transcription' && (
|
||||||
<TranscriptionView
|
<TranscriptionView
|
||||||
|
|||||||
@@ -42,6 +42,7 @@ interface RecorderProps {
|
|||||||
addToast: (msg: string, type: 'success' | 'error' | 'info', duration?: number) => void;
|
addToast: (msg: string, type: 'success' | 'error' | 'info', duration?: number) => void;
|
||||||
selectedModel: string;
|
selectedModel: string;
|
||||||
onModelChange: (model: string) => void;
|
onModelChange: (model: string) => void;
|
||||||
|
isVisible: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface AudioDevice {
|
interface AudioDevice {
|
||||||
@@ -246,6 +247,12 @@ const Recorder: React.FC<RecorderProps> = ({
|
|||||||
};
|
};
|
||||||
}, [isRecording, addToast]); // Dependencies for listener setup
|
}, [isRecording, addToast]); // Dependencies for listener setup
|
||||||
|
|
||||||
|
// Ref for visibility to avoid closure staleness in interval
|
||||||
|
const isVisibleRef = useRef(props.isVisible);
|
||||||
|
useEffect(() => {
|
||||||
|
isVisibleRef.current = props.isVisible;
|
||||||
|
}, [props.isVisible]);
|
||||||
|
|
||||||
// Auto-Stop Interval Effect
|
// Auto-Stop Interval Effect
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!isRecording || isPaused || isWaiting) return;
|
if (!isRecording || isPaused || isWaiting) return;
|
||||||
@@ -255,8 +262,9 @@ const Recorder: React.FC<RecorderProps> = ({
|
|||||||
const timeSinceSpeech = (now - lastSpeechTimeRef.current) / 1000;
|
const timeSinceSpeech = (now - lastSpeechTimeRef.current) / 1000;
|
||||||
setSilenceDuration(timeSinceSpeech);
|
setSilenceDuration(timeSinceSpeech);
|
||||||
|
|
||||||
// AUTO STOP after 20 seconds of silence (ALL MODES)
|
// AUTO STOP Logic
|
||||||
if (timeSinceSpeech > 20 && !isStoppingRef.current) {
|
// Use Ref to get LATEST visibility instantly
|
||||||
|
if (isVisibleRef.current && timeSinceSpeech > 20 && !isStoppingRef.current) {
|
||||||
console.log("Auto-stopping due to silence...");
|
console.log("Auto-stopping due to silence...");
|
||||||
isStoppingRef.current = true;
|
isStoppingRef.current = true;
|
||||||
addToast('Auto-stopped due to silence', 'info');
|
addToast('Auto-stopped due to silence', 'info');
|
||||||
@@ -265,7 +273,7 @@ const Recorder: React.FC<RecorderProps> = ({
|
|||||||
}, 1000);
|
}, 1000);
|
||||||
|
|
||||||
return () => clearInterval(interval);
|
return () => clearInterval(interval);
|
||||||
}, [isRecording, isPaused, isWaiting, recordingMode, addToast]); // Added recordingMode dependency
|
}, [isRecording, isPaused, isWaiting, recordingMode, addToast]); // Removed props.isVisible dependency (using Ref)
|
||||||
|
|
||||||
// Handle Auto Start Prop
|
// Handle Auto Start Prop
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
|||||||
Reference in New Issue
Block a user