From f2da35f999eeae5144b3e1a02693cf0f21ab3f2d Mon Sep 17 00:00:00 2001 From: Ryan Lintott Date: Wed, 22 Jun 2022 16:59:50 -0400 Subject: [PATCH] Added accessibilityOldEnglishIPA to String --- Sources/OEVoice/extensions/String-extensions.swift | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Sources/OEVoice/extensions/String-extensions.swift b/Sources/OEVoice/extensions/String-extensions.swift index 5028a40..dc6a186 100644 --- a/Sources/OEVoice/extensions/String-extensions.swift +++ b/Sources/OEVoice/extensions/String-extensions.swift @@ -66,6 +66,16 @@ public extension String { /// Adds accessible phonetic pronunciation for specified phrases. /// - Parameter phrases: Dictionary of phrases and ipa pronunciations for those phrases /// - Returns: `AttributedString` with accessible phonetic pronunciations for specified phrases - func accessibilityIPA(_ phrases: [String: String], voice: OEVoice = .default) -> AttributedString { AttributedString(self).accessibilityIPA(phrases) + func accessibilityIPA(_ phrases: [String: String], voice: OEVoice = .default) -> AttributedString { + AttributedString(self).accessibilityIPA(phrases) + } + + /// Adds accessible Old English IPA pronunciation for specified phrases. + /// WARNING: User voice may not match supported OEVoice so pronunciations may be incorrect + /// WARNING: Does not work with these characters in the source: Ā Ǣǣ Ē Ī Ō Ū Ȳȳ Æ Ð Þ Ƿƿ + /// - Parameter phrases: Dictionary of phrases and ipa pronunciations for those phrases + /// - Returns: `AttributedString` with accessible Old Egnlish IPA pronunciations for specified phrases + func accessibilityOldEnglishIPA(_ phrases: [String: String], voice: OEVoice = .default) -> AttributedString { + AttributedString(self).accessibilityOldEnglishIPA(phrases, voice: voice) } }