OSSSpeech
public class OSSSpeech : NSObject
Speech is the primary interface. To use, set the voice and then call .speak(string: "your string")
-
An object that allows overriding the default AVVoice options.
Declaration
Swift
public var voice: OSSVoice?
-
The object used to enable translation of strings to synthsized voice.
Declaration
Swift
public var utterance: OSSUtterance?
-
A singleton object to ensure conformity accross the application it is used in.
Declaration
Swift
public class var shared: OSSSpeech { get }
-
Pass in a string to speak. This will set the speechString on the utterance.
Declaration
Swift
public func speakText(text: String)
Parameters
text
An String object.
-
Pass in an attributed string to speak. This will set the attributed string on the utterance.
Declaration
Swift
public func speakAttributedText(attributedText: NSAttributedString)
Parameters
attributedText
An NSAttributedString object.
-
Method outputs a debug statement containing necessary information to resolve issues.
Only works with debug/dev builds.
Declaration
Swift
public func debugLog(object: Any, functionName: String = #function, fileName: String = #file, lineNumber: Int = #line, message: String)
Parameters
object
Any object type
functionName
Automatically populated by the application
fileName
Automatically populated by the application
lineNumber
Automatically populated by the application
message
The message you wish to output.