Conversation
Initial commit - Google cocoapod dependencies Project meta - new classes Project meta - new classes moved OSStatus returned methods to private scope and stubbed out new wrapper methods adding example project for future usage
…llerdelegate implementation Refactored enums with SP prefix SP prefix for the params
- initial commit
- new classes
- Standard Google Configuration
… set to the RecognizerConfiguration
case audioSessionSetup(String) | ||
} | ||
|
||
public enum SpeechPipleError: Error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SpeechPipelineError
?
// Configuration settings file format documentation can be found at: | ||
// https://help.apple.com/xcode/#/dev745c5c974 | ||
|
||
THIRD_PARTY_FRAMEWORK_PATH = ${SRCROOT}/Frameworks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is gross, thanks Google.
|
||
do { | ||
|
||
try AVAudioSession.sharedInstance().setCategory(.playAndRecord, mode: .spokenAudio, options: .defaultToSpeaker) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, I didn't know that AVAudioSession
had a mode for speech. Of course there's the mysterious voicePrompt
mode too…
|
||
/// We recommend sending samples in 100ms chunks | ||
|
||
let chunkSize: Int = Int(0.1 * Double(AudioController.shared.sampleRate) * 2) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this results in 16000*0.1*2=3200
so 0.3125
ms chunks? My math must be wrong somehow.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
actually, the 2
is assuming that the input is stereo.
No description provided.