Add Google Speech To Text To Existing Project

Google created many useful libraries also on iOS platform. One of them is Speech to Text.

We will add it to our existing project using CocoaPods.

Before you start you need:
1 Have some existing project where you want to add speech recognition.
2 How to use CocoaPods
3 Use Google’s code

Firstly, download or clone the repository and open it.

Go to speech folder.

Next to Swift folder.

Next to Speech-gRPC-Streaming. Inside copy google folder and googleapis.podspec.

Go to your project folder and paste them.

Then add googleapis dependency using Podfile.

After you open the project you won’t be able to use googleapis yet. Some headers are imported incorrectly and you need to change them manually.

After each change try to build a project and you’ll be moved to next. There are about 10 changes.

change to

change to

change to

change to

change to

change to

After these changes you can use Google’s api.