File tree Expand file tree Collapse file tree
Sources/FluidAudio/TextToSpeech/Kokoro/Assets/Lexicon Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -70,17 +70,24 @@ final class EspeakG2P {
7070
7171 private static func frameworkBundledDataPath( ) -> URL ? {
7272 // Try to find espeak-ng-data.bundle in all loaded bundles
73+ let logger = AppLogger ( subsystem: " com.fluidaudio.tts " , category: " EspeakG2P " )
74+
7375 for bundle in Bundle . allBundles {
7476 if let bundleURL = bundle. url ( forResource: " espeak-ng-data " , withExtension: " bundle " ) {
7577 let dataDir = bundleURL. appendingPathComponent ( " espeak-ng-data " )
7678 let voicesPath = dataDir. appendingPathComponent ( " voices " )
7779
7880 if FileManager . default. fileExists ( atPath: voicesPath. path) {
81+ logger. info ( " Found eSpeak data bundle at: \( dataDir. path) " )
7982 return dataDir
83+ } else {
84+ logger. warning ( " Found espeak-ng-data.bundle but voices directory missing at: \( voicesPath. path) " )
8085 }
8186 }
8287 }
8388
89+ logger. error (
90+ " Could not find espeak-ng-data.bundle in any loaded bundle. Searched \( Bundle . allBundles. count) bundles. " )
8491 return nil
8592 }
8693
You can’t perform that action at this time.
0 commit comments