     var asAVSpeechSynthesizerVolume: Float { Float(self) / 100.0 }
 }
 
+private extension Array where Element == SpeechManager.Speech {
+    func firstAudioLoader(state: AudioLoader.LoadState) -> AudioLoader? {
+        return map { $0.audioLoader }.filter { $0.state == state }.first
+    }
+}
+
 private extension SpeechManager {
     func logAudioQueue() {
         let message = "speechQueueCount: \(speechQueue.count), speed: \(voiceSpeed)"

        speechQueue.removeAll()
        recentSpeechTexts.removeAll()
        activeSpeech = nil
        log.debug("stopped speech manager.")
    }


    private var activeSpeech: Speech?
    private var allSpeeches: [Speech] { ([activeSpeech] + speechQueue).compactMap { $0 } }
    private var recentSpeechTexts: [String] = []
    private var trashQueue: [Speech] = []

    // min(normal): 1.0, fast: 2.0
    private var voiceSpeed: Float = 1.0
