Skip to content

Commit

Permalink
Merge pull request #977 from watson-developer-cloud/develop
Browse files Browse the repository at this point in the history
Release 2.1.1
  • Loading branch information
Mike Kistler authored Jun 28, 2019
2 parents 2f9e0dd + 8aeac12 commit b63cb66
Show file tree
Hide file tree
Showing 17 changed files with 49 additions and 40 deletions.
12 changes: 9 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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


Expand Down Expand Up @@ -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_
Expand Down Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion IBMWatsonAssistantV1.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -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' => '[email protected]' }

s.module_name = 'Assistant'
Expand Down
2 changes: 1 addition & 1 deletion IBMWatsonAssistantV2.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -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' => '[email protected]' }

s.module_name = 'Assistant'
Expand Down
3 changes: 2 additions & 1 deletion IBMWatsonCompareComplyV1.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -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' => '[email protected]' }
s.authors = { 'Jeff Arn' => '[email protected]',
'Mike Kistler' => '[email protected]' }

s.module_name = 'CompareComply'
s.ios.deployment_target = '10.0'
Expand Down
2 changes: 1 addition & 1 deletion IBMWatsonDiscoveryV1.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -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' => '[email protected]' }

s.module_name = 'Discovery'
Expand Down
2 changes: 1 addition & 1 deletion IBMWatsonLanguageTranslatorV3.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -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' => '[email protected]' }

s.module_name = 'LanguageTranslator'
Expand Down
2 changes: 1 addition & 1 deletion IBMWatsonNaturalLanguageClassifierV1.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -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' => '[email protected]' }

s.module_name = 'NaturalLanguageClassifier'
Expand Down
2 changes: 1 addition & 1 deletion IBMWatsonNaturalLanguageUnderstandingV1.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -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' => '[email protected]' }

s.module_name = 'NaturalLanguageUnderstanding'
Expand Down
2 changes: 1 addition & 1 deletion IBMWatsonPersonalityInsightsV3.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -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' => '[email protected]' }

s.module_name = 'PersonalityInsights'
Expand Down
2 changes: 1 addition & 1 deletion IBMWatsonSpeechToTextV1.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -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' => '[email protected]' }

s.module_name = 'SpeechToText'
Expand Down
2 changes: 1 addition & 1 deletion IBMWatsonTextToSpeechV1.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -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' => '[email protected]' }

s.module_name = 'TextToSpeech'
Expand Down
2 changes: 1 addition & 1 deletion IBMWatsonToneAnalyzerV3.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -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' => '[email protected]' }

s.module_name = 'ToneAnalyzer'
Expand Down
2 changes: 1 addition & 1 deletion IBMWatsonVisualRecognitionV3.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -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' => '[email protected]' }

s.module_name = 'VisualRecognition'
Expand Down
8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down
10 changes: 2 additions & 8 deletions Scripts/generate-documentation.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand Down
24 changes: 13 additions & 11 deletions Scripts/travis/publish-documentation.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,17 @@ git fetch
git checkout master
latestVersion=$(git describe --abbrev=0 --tags)

git clone --quiet --branch=gh-pages [email protected]: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
10 changes: 9 additions & 1 deletion Source/SpeechToTextV1/SpeechToText+Recognize.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand All @@ -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."
Expand Down

0 comments on commit b63cb66

Please sign in to comment.