diff --git a/src/components/Settings/TTSSettings.tsx b/src/components/Settings/TTSSettings.tsx index 30b22b48..b1d0f8dd 100644 --- a/src/components/Settings/TTSSettings.tsx +++ b/src/components/Settings/TTSSettings.tsx @@ -1,4 +1,6 @@ import React from 'react' +import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' +import { faGauge } from '@fortawesome/free-solid-svg-icons' import { UserSettings } from '../../services/settingsService' interface TTSSettingsProps { @@ -9,25 +11,30 @@ interface TTSSettingsProps { const SPEED_OPTIONS = [0.8, 1, 1.2, 1.4, 1.6, 1.8, 2, 2.1, 2.4, 2.8, 3] const TTSSettings: React.FC = ({ settings, onUpdate }) => { + const currentSpeed = settings.ttsDefaultSpeed || 2.1 + + const handleCycleSpeed = () => { + const currentIndex = SPEED_OPTIONS.indexOf(currentSpeed) + const nextIndex = (currentIndex + 1) % SPEED_OPTIONS.length + onUpdate({ ttsDefaultSpeed: SPEED_OPTIONS[nextIndex] }) + } + return (

Text-to-Speech

- +
-
- {SPEED_OPTIONS.map(speed => ( - - ))} -
+