George Barnett 5606a13515 Update CocoaPods to alpha.20 (#982) 5 years ago
..
Images 1eb00174a4 Bidirectional Streaming iOS Example (#776) 5 years ago
Sources 312dde0647 Configure logging in the SpeechToText example (#973) 5 years ago
SpeechToText-gRPC-iOS.xcodeproj 1eb00174a4 Bidirectional Streaming iOS Example (#776) 5 years ago
SpeechToText-gRPC-iOS.xcworkspace 1eb00174a4 Bidirectional Streaming iOS Example (#776) 5 years ago
.gitignore 312dde0647 Configure logging in the SpeechToText example (#973) 5 years ago
Makefile 1eb00174a4 Bidirectional Streaming iOS Example (#776) 5 years ago
Podfile 5606a13515 Update CocoaPods to alpha.20 (#982) 5 years ago
Podfile.lock 22b2203895 Update CocoaPod for Speech-To-Text example (#851) 5 years ago
README.md 1eb00174a4 Bidirectional Streaming iOS Example (#776) 5 years ago

README.md

Speech-To-Text gRPC iOS Example

Description

This application demonstrates Bidirectional Streaming to convert streamed audio data into text and display the Server processing live using gRPC Swift, built on top of SwiftNIO. Much of the gRPC specific logic can be found in Sources/SpeechService.swift.

Technologies

Acquiring an API Key

This project requires a Google Cloud API Key. Please register and create an API key in order to consume the API.

Project Setup

  1. Clone the repository
  2. Navigate to the root directory (Examples/Google/SpeechToText) and run pod install
  3. Run make protos to pull the most recent .proto files from the googleapis repository
  4. run make generate to leverage the protoc plugin to generate the Swift interfaces
    • Note: Please refer to Getting the protoc Plugins. For this tutorial, the Makefile requires that the protoc-gen-grpc-swift and protoc-gen-swift are on the users PATH.
  5. Open the .xcworkspace
  6. Open the Constants.swift file and assign your generated Google Cloud API Key to the apiKey variable.
    • Note: Once you add the API Key, feel free to remove the forced warning/reminder on line 23.
  7. Run the application!

Helpful Links

NOTE: Implementation of the AudioStreamManager is based off of Google's Example Audio Streaming