This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
############################################################################### | |
## ## | |
## Build and package OpenSSL static libraries for OSX/iOS ## | |
## ## | |
## This script is in the public domain. ## | |
## Creator : Laurent Etiemble ## | |
## ## | |
############################################################################### |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// this method must be added into the class which implements SDLManagerDelegate | |
// at least you should return an empty object if you support the language. | |
- (nullable SDLLifecycleConfigurationUpdate *)managerShouldUpdateLifecycleToLanguage:(SDLLanguage)language hmiLanguage:(SDLLanguage)hmiLanguage { | |
SDLLifecycleConfigurationUpdate *update = [[SDLLifecycleConfigurationUpdate alloc] init]; | |
return update; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
+ (CVPixelBufferRef)croppedPixelBufferFromSampleBuffer:(CMSampleBufferRef)buffer frame:(CGRect)frame { | |
if (buffer == nil) return nil; | |
CVImageBufferRef imageBuffer = CMSampleBufferGetImageBuffer(buffer); | |
if (imageBuffer == nil) return nil; | |
CIImage *ciImage = [CIImage imageWithCVPixelBuffer:imageBuffer]; | |
ciImage = [ciImage imageByCroppingToRect:frame]; | |
CFDictionaryRef empty; // empty value for attr IOSurface |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// how to create an audio IO manager. You should do this right after the SDL manager is created | |
self.audioManager = [[SDLAudioIOManager alloc] initWithManager:self.sdlManager delegate:self]; | |
self.audioManager.inputStreamPrompt = [[SDLTTSChunk alloc] initWithText:SDLPrerecordedSpeechListen type:SDLSpeechCapabilitiesPrerecorded]; | |
self.audioManager.inputStreamText = @"Listening..."; | |
// how to start the audio IO manager. Whenever the user presses the mic button on the screen | |
[self.audioManager startInputStream]; // this is it | |
// how to stop the audio IO manager if you have recognized user input | |
[self.audioManager stopInputStream]; |