feat: 完善听力口语辅助状态记录、练习分块与复习抽查间隔机制
This commit is contained in:
@@ -77,7 +77,7 @@ class VoiceService {
|
||||
} catch (_) {}
|
||||
}
|
||||
|
||||
Future<void> speak(String text, {bool slow = false}) async {
|
||||
Future<bool> speak(String text, {bool slow = false}) async {
|
||||
try {
|
||||
await stopRecordingPlayback();
|
||||
await _initTts();
|
||||
@@ -95,8 +95,11 @@ class VoiceService {
|
||||
} catch (_) {}
|
||||
}
|
||||
await _tts.setSpeechRate(slow ? 0.35 : 0.48);
|
||||
await _tts.speak(text);
|
||||
} catch (_) {}
|
||||
final result = await _tts.speak(text);
|
||||
return result == 1 || result == true;
|
||||
} catch (_) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> stopSpeaking() async {
|
||||
|
||||
Reference in New Issue
Block a user