+
+
+ {formattedTime}
+
+
+ {displayedLevels.map((level, index) => {
+ const clamped = Math.max(0.1, Math.min(level, 1))
+ const barHeight = 1 + clamped * (visualizerBarHeight - 1)
+ const barColor = typeof visualizerBarColor === 'function'
+ ? visualizerBarColor(level, index)
+ : visualizerBarColor
+
+ return (
+
+ )
+ })}
+
+
+ {state === 'recording' && (
+
+
+
+
+
+ )}
+
+ {state === 'paused' && (
+
+
+
+
+
+
+ )}
+
+ {state === 'reviewing' && (
+
+
+
+
+
+ )}
+
+ {state === 'playing' && (
+
+
+
+ )}
+
+ {error && (
+
+ {error}
+
+ )}
+
+ )
+}
+
+export default VoiceRecorder
diff --git a/voice-kit/icons.tsx b/voice-kit/icons.tsx
new file mode 100644
index 00000000..00e0c738
--- /dev/null
+++ b/voice-kit/icons.tsx
@@ -0,0 +1,94 @@
+import type { FC } from 'react'
+
+export const PlayIcon: FC<{ size?: number }> = ({ size = 18 }) => (
+