diff --git a/CHANGELOG.md b/CHANGELOG.md index 9f45dab3f..a6d31ce89 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,10 @@ +## 2.1.1 (https://github.com/watson-developer-cloud/swift-sdk/compare/2.1.0...2.1.1) (2019-06-28) + +### Bug Fixes + +* SpeechToTextV1: Add configureSession parameter to RecognizeMicrophone. (87f5aed (https://github.com/watson-developer-cloud/swift-sdk/commit/87f5aed)) + # 2.1.0 (https://github.com/watson-developer-cloud/swift-sdk/compare/2.0.3...2.1.0) (2019-06-08) ### Features @@ -53,7 +59,7 @@ * **AssistantV1:** * Some model classes have been merged / simplified * The `InputData` class has been renamed to `MessageInput` -* **SpeechToTextV1:** +* **SpeechToTextV1:** * The `recognizeWithWebsockets` method has been revised to accept a `RecognizeCallback` object with `onResults` and `onError` callback properties @@ -508,7 +514,7 @@ _2017-03-2_ This update includes: - Updates for Natural Language Understanding service. -- Bug fixes for memory leak in text to speech. +- Bug fixes for memory leak in text to speech. ## Version 0.14.0 _2017-02-10_ @@ -749,7 +755,7 @@ The iOS-sdk version 0.3.0 has many major changes with this new release. The tea **Major updates** * Added IBM Watson Tone Analyzer -* Added IBM Watson Visual Recognition +* Added IBM Watson Visual Recognition * Updated all of the code to use the new Rest-kit and removed NetworkUtils and WatsonGateway. We still have one service to convert, Alchemy Language, but we anticipate that change coming in the next minor release. * Removed many dependencies and reducing the total number to three. Alamofire, Freddy, and Starscream. * You will notice an update to the targets available and now the developer can pick and choose the services to include. diff --git a/IBMWatsonAssistantV1.podspec b/IBMWatsonAssistantV1.podspec index df12122a1..5b571e77c 100644 --- a/IBMWatsonAssistantV1.podspec +++ b/IBMWatsonAssistantV1.podspec @@ -9,7 +9,7 @@ natural-language input and uses machine learning to respond to customers in a wa DESC s.homepage = 'https://www.ibm.com/watson/ai-assistant/' s.license = { :type => 'Apache License, Version 2.0', :file => 'LICENSE' } - s.authors = { 'Anthony Oliveri' => 'oliveri@us.ibm.com', + s.authors = { 'Jeff Arn' => 'jtarn@us.ibm.com', 'Mike Kistler' => 'mkistler@us.ibm.com' } s.module_name = 'Assistant' diff --git a/IBMWatsonAssistantV2.podspec b/IBMWatsonAssistantV2.podspec index 458209ac9..d1eb027e8 100644 --- a/IBMWatsonAssistantV2.podspec +++ b/IBMWatsonAssistantV2.podspec @@ -9,7 +9,7 @@ natural-language input and uses machine learning to respond to customers in a wa DESC s.homepage = 'https://www.ibm.com/watson/ai-assistant/' s.license = { :type => 'Apache License, Version 2.0', :file => 'LICENSE' } - s.authors = { 'Anthony Oliveri' => 'oliveri@us.ibm.com', + s.authors = { 'Jeff Arn' => 'jtarn@us.ibm.com', 'Mike Kistler' => 'mkistler@us.ibm.com' } s.module_name = 'Assistant' diff --git a/IBMWatsonCompareComplyV1.podspec b/IBMWatsonCompareComplyV1.podspec index 80fcab65a..c86887cd9 100644 --- a/IBMWatsonCompareComplyV1.podspec +++ b/IBMWatsonCompareComplyV1.podspec @@ -8,7 +8,8 @@ IBM Watson™ Compare and Comply analyzes governing documents to provide details DESC s.homepage = 'https://www.ibm.com/blogs/watson/2018/02/watson-compare-comply/' s.license = { :type => 'Apache License, Version 2.0', :file => 'LICENSE' } - s.authors = { 'Anthony Oliveri' => 'oliveri@us.ibm.com' } + s.authors = { 'Jeff Arn' => 'jtarn@us.ibm.com', + 'Mike Kistler' => 'mkistler@us.ibm.com' } s.module_name = 'CompareComply' s.ios.deployment_target = '10.0' diff --git a/IBMWatsonDiscoveryV1.podspec b/IBMWatsonDiscoveryV1.podspec index 6fcd49b12..20d6462d1 100644 --- a/IBMWatsonDiscoveryV1.podspec +++ b/IBMWatsonDiscoveryV1.podspec @@ -10,7 +10,7 @@ as well as public and third-party data. DESC s.homepage = 'https://www.ibm.com/watson/services/discovery/' s.license = { :type => 'Apache License, Version 2.0', :file => 'LICENSE' } - s.authors = { 'Anthony Oliveri' => 'oliveri@us.ibm.com', + s.authors = { 'Jeff Arn' => 'jtarn@us.ibm.com', 'Mike Kistler' => 'mkistler@us.ibm.com' } s.module_name = 'Discovery' diff --git a/IBMWatsonLanguageTranslatorV3.podspec b/IBMWatsonLanguageTranslatorV3.podspec index c5d913761..862619c0c 100644 --- a/IBMWatsonLanguageTranslatorV3.podspec +++ b/IBMWatsonLanguageTranslatorV3.podspec @@ -8,7 +8,7 @@ IBM Watson™ Language Translator can identify the language of text and translat DESC s.homepage = 'https://www.ibm.com/watson/services/language-translator/' s.license = { :type => 'Apache License, Version 2.0', :file => 'LICENSE' } - s.authors = { 'Anthony Oliveri' => 'oliveri@us.ibm.com', + s.authors = { 'Jeff Arn' => 'jtarn@us.ibm.com', 'Mike Kistler' => 'mkistler@us.ibm.com' } s.module_name = 'LanguageTranslator' diff --git a/IBMWatsonNaturalLanguageClassifierV1.podspec b/IBMWatsonNaturalLanguageClassifierV1.podspec index e4b4b12b0..3613f02d8 100644 --- a/IBMWatsonNaturalLanguageClassifierV1.podspec +++ b/IBMWatsonNaturalLanguageClassifierV1.podspec @@ -10,7 +10,7 @@ return information for texts that it is not trained on. DESC s.homepage = 'https://www.ibm.com/watson/services/natural-language-classifier/' s.license = { :type => 'Apache License, Version 2.0', :file => 'LICENSE' } - s.authors = { 'Anthony Oliveri' => 'oliveri@us.ibm.com', + s.authors = { 'Jeff Arn' => 'jtarn@us.ibm.com', 'Mike Kistler' => 'mkistler@us.ibm.com' } s.module_name = 'NaturalLanguageClassifier' diff --git a/IBMWatsonNaturalLanguageUnderstandingV1.podspec b/IBMWatsonNaturalLanguageUnderstandingV1.podspec index 50cea92dd..3d4a92836 100644 --- a/IBMWatsonNaturalLanguageUnderstandingV1.podspec +++ b/IBMWatsonNaturalLanguageUnderstandingV1.podspec @@ -9,7 +9,7 @@ including categories, concepts, emotion, entities, keywords, metadata, relations DESC s.homepage = 'https://www.ibm.com/watson/services/natural-language-understanding/' s.license = { :type => 'Apache License, Version 2.0', :file => 'LICENSE' } - s.authors = { 'Anthony Oliveri' => 'oliveri@us.ibm.com', + s.authors = { 'Jeff Arn' => 'jtarn@us.ibm.com', 'Mike Kistler' => 'mkistler@us.ibm.com' } s.module_name = 'NaturalLanguageUnderstanding' diff --git a/IBMWatsonPersonalityInsightsV3.podspec b/IBMWatsonPersonalityInsightsV3.podspec index 100c06910..2730c2f2f 100644 --- a/IBMWatsonPersonalityInsightsV3.podspec +++ b/IBMWatsonPersonalityInsightsV3.podspec @@ -9,7 +9,7 @@ from digital communications such as email, text messages, tweets, and forum post DESC s.homepage = 'https://www.ibm.com/watson/services/personality-insights/' s.license = { :type => 'Apache License, Version 2.0', :file => 'LICENSE' } - s.authors = { 'Anthony Oliveri' => 'oliveri@us.ibm.com', + s.authors = { 'Jeff Arn' => 'jtarn@us.ibm.com', 'Mike Kistler' => 'mkistler@us.ibm.com' } s.module_name = 'PersonalityInsights' diff --git a/IBMWatsonSpeechToTextV1.podspec b/IBMWatsonSpeechToTextV1.podspec index 4f819ded3..cc11ad9c6 100644 --- a/IBMWatsonSpeechToTextV1.podspec +++ b/IBMWatsonSpeechToTextV1.podspec @@ -10,7 +10,7 @@ of the audio signal. It continuously returns and retroactively updates a transcr DESC s.homepage = 'https://www.ibm.com/watson/services/speech-to-text/' s.license = { :type => 'Apache License, Version 2.0', :file => 'LICENSE' } - s.authors = { 'Anthony Oliveri' => 'oliveri@us.ibm.com', + s.authors = { 'Jeff Arn' => 'jtarn@us.ibm.com', 'Mike Kistler' => 'mkistler@us.ibm.com' } s.module_name = 'SpeechToText' diff --git a/IBMWatsonTextToSpeechV1.podspec b/IBMWatsonTextToSpeechV1.podspec index b352e6763..6bbf55aae 100644 --- a/IBMWatsonTextToSpeechV1.podspec +++ b/IBMWatsonTextToSpeechV1.podspec @@ -9,7 +9,7 @@ The service streams the results back to the client with minimal delay. DESC s.homepage = 'https://www.ibm.com/watson/services/text-to-speech/' s.license = { :type => 'Apache License, Version 2.0', :file => 'LICENSE' } - s.authors = { 'Anthony Oliveri' => 'oliveri@us.ibm.com', + s.authors = { 'Jeff Arn' => 'jtarn@us.ibm.com', 'Mike Kistler' => 'mkistler@us.ibm.com' } s.module_name = 'TextToSpeech' diff --git a/IBMWatsonToneAnalyzerV3.podspec b/IBMWatsonToneAnalyzerV3.podspec index 82d8c142d..5b5905e10 100644 --- a/IBMWatsonToneAnalyzerV3.podspec +++ b/IBMWatsonToneAnalyzerV3.podspec @@ -9,7 +9,7 @@ The service can analyze tone at both the document and sentence levels. DESC s.homepage = 'https://www.ibm.com/watson/services/tone-analyzer/' s.license = { :type => 'Apache License, Version 2.0', :file => 'LICENSE' } - s.authors = { 'Anthony Oliveri' => 'oliveri@us.ibm.com', + s.authors = { 'Jeff Arn' => 'jtarn@us.ibm.com', 'Mike Kistler' => 'mkistler@us.ibm.com' } s.module_name = 'ToneAnalyzer' diff --git a/IBMWatsonVisualRecognitionV3.podspec b/IBMWatsonVisualRecognitionV3.podspec index b53322b91..6fe7f5d29 100644 --- a/IBMWatsonVisualRecognitionV3.podspec +++ b/IBMWatsonVisualRecognitionV3.podspec @@ -9,7 +9,7 @@ scenes, objects, faces, and other content. The response includes keywords that p DESC s.homepage = 'https://www.ibm.com/watson/services/visual-recognition/' s.license = { :type => 'Apache License, Version 2.0', :file => 'LICENSE' } - s.authors = { 'Anthony Oliveri' => 'oliveri@us.ibm.com', + s.authors = { 'Jeff Arn' => 'jtarn@us.ibm.com', 'Mike Kistler' => 'mkistler@us.ibm.com' } s.module_name = 'VisualRecognition' diff --git a/README.md b/README.md index 7c166b7f6..10b650815 100755 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ The Watson Developer Cloud Swift SDK makes it easy for mobile developers to buil There are many resources to help you build your first cognitive application with the Swift SDK: - Follow the [QuickStart Guide](https://watson-developer-cloud.github.io/swift-sdk/docs/quickstart) -- Review a [Sample Application](#sample-applications) +- Review a [Featured Project](#featured-projects) - Browse the [Documentation](https://watson-developer-cloud.github.io/swift-sdk/) ## Contents @@ -28,7 +28,7 @@ There are many resources to help you build your first cognitive application with * [Authentication](#authentication) * [Custom Service URLs](#custom-service-urls) * [Custom Headers](#custom-headers) -* [Sample Applications](#sample-applications) +* [Featured Projects](#featured-projects) * [Synchronous Execution](#synchronous-execution) * [Objective-C Compatibility](#objective-c-compatibility) * [Linux Compatibility](#linux-compatibility) @@ -109,7 +109,7 @@ $ brew update $ brew install carthage ``` -If your project does not have a Cartfile yet, use the `touch Cartfile` command in the root directory of your project. To install the IBM Watson Swift SDK using Carthage, add the following to your Cartfile. +If your project does not have a Cartfile yet, use the `touch Cartfile` command in the root directory of your project. To install the IBM Watson Swift SDK using Carthage, add the following to your Cartfile. ``` github "watson-developer-cloud/swift-sdk" ~> 2.1.0 @@ -257,12 +257,10 @@ Each service method also accepts an optional `headers` parameter which is a dict We love to highlight cool open-source projects that use this SDK! If you'd like to get your project added to the list, feel free to make an issue linking us to it. * [Simple Chat (Swift)](https://github.com/watson-developer-cloud/simple-chat-swift) -* [Simple Chat (Objective-C)](https://github.com/watson-developer-cloud/simple-chat-objective-c) * [Visual Recognition with Core ML](https://github.com/watson-developer-cloud/visual-recognition-coreml) * [Visual Recognition and Discovery with Core ML](https://github.com/watson-developer-cloud/visual-recognition-with-discovery-coreml) * [Speech to Text](https://github.com/watson-developer-cloud/speech-to-text-swift) * [Text to Speech](https://github.com/watson-developer-cloud/text-to-speech-swift) -* [Cognitive Concierge](https://github.com/IBM-MIL/CognitiveConcierge) ## Synchronous Execution diff --git a/Scripts/generate-documentation.sh b/Scripts/generate-documentation.sh index 2e70881cc..74dfeaadf 100755 --- a/Scripts/generate-documentation.sh +++ b/Scripts/generate-documentation.sh @@ -36,14 +36,7 @@ cd .. # Create folder for generated documentation ################################################################################ -if [ -d "${outdir}" ]; then - echo "The output directory ${outdir} already exists." - echo "Please remove the directory and try again." - exit -fi - -mkdir ${outdir} -mkdir ${outdir}/services +mkdir -p ${outdir}/services ################################################################################ # Run Jazzy to generate documentation @@ -60,6 +53,7 @@ for service in ${services[@]}; do --readme Source/${service}/README.md \ --documentation README.md \ --github_url https://github.com/watson-developer-cloud/swift-sdk \ + --copyright "© IBM Corp. 2016-$(date +%Y). (Last updated: $(date +%Y-%m-%d))" \ --hide-documentation-coverage done diff --git a/Scripts/travis/publish-documentation.sh b/Scripts/travis/publish-documentation.sh index a9344230d..b161c40ad 100755 --- a/Scripts/travis/publish-documentation.sh +++ b/Scripts/travis/publish-documentation.sh @@ -18,15 +18,17 @@ git fetch git checkout master latestVersion=$(git describe --abbrev=0 --tags) +git clone --quiet --branch=gh-pages git@github.com:watson-developer-cloud/swift-sdk.git gh-pages > /dev/null + +# Delete all the old docs (but not the docs directory -- this is hand written) +(cd gh-pages && git rm -rf css img index.html js services undocumented.json) + # Generate the API docs -./Scripts/generate-documentation.sh - -# Push newly-generated docs to the gh-pages branch -git checkout --track origin/gh-pages -# Delete old docs -rm -rf css img js services -cp -r gh-pages/* . -rm -rf gh-pages/ -git add . -git commit -m "SDK docs for release ${latestVersion}" -git push --set-upstream origin gh-pages +./Scripts/generate-documentation.sh gh-pages + +# Commit and push the newly generated API docs +pushd gh-pages + git add . + git commit -m "SDK docs for release ${latestVersion}" + git push +popd diff --git a/Source/SpeechToTextV1/SpeechToText+Recognize.swift b/Source/SpeechToTextV1/SpeechToText+Recognize.swift index 294780a51..97b32eeed 100644 --- a/Source/SpeechToTextV1/SpeechToText+Recognize.swift +++ b/Source/SpeechToTextV1/SpeechToText+Recognize.swift @@ -140,6 +140,11 @@ extension SpeechToText { By default, no customer ID is associated with the data. - parameter compress: Should microphone audio be compressed to Opus format? (Opus compression reduces latency and bandwidth.) + - parameter configureSession: A Boolean value that specifies whether to configure the AVAudioSession. + When `true`, the AVAudioSession is set to a standard configuration for microphone input. When `false`, + the current AVAudioSession configuration is used. To use an AVAudioSession configuration other than + the standard microphone configuration, set the configuration in your application and specify `false` + for the **configureSession** parameter. Default is `true`. - parameter headers: A dictionary of request headers to be sent with this request. - parameter completionHandler: A function executed when the request completes with a successful result or error */ @@ -152,13 +157,16 @@ extension SpeechToText { learningOptOut: Bool? = nil, customerID: String? = nil, compress: Bool = true, + configureSession: Bool = true, headers: [String: String]? = nil, callback: RecognizeCallback) { // make sure the AVAudioSession shared instance is properly configured do { let audioSession = AVAudioSession.sharedInstance() - try audioSession.setCategory(AVAudioSession.Category.playAndRecord, mode: .default, options: [.defaultToSpeaker, .mixWithOthers]) + if configureSession { + try audioSession.setCategory(AVAudioSession.Category.playAndRecord, mode: .default, options: [.defaultToSpeaker, .mixWithOthers]) + } try audioSession.setActive(true) } catch { let failureReason = "Failed to setup the AVAudioSession sharedInstance properly."