Skip to content

flitsmeister/mapbox-speech-swift

 
 

Repository files navigation

MaplibreSpeech.swift

A module for using the Mapbox Speech API specifically tuned for the Mapbox Navigation SDK.

Why have we forked

  1. We wanted to upgrade the SDK from iOS 9.0 to 12.0.

What have we changed

  • Upgrade iOS version from 9.0 to 12.0.

Getting started

If you are looking to include this inside your project, you have to follow the the following steps:

Specify the following dependency in your Carthage Cartfile:

github "mapbox/MapboxSpeech.swift" ~> 0.1

Or in your CocoaPods Podfile:

pod 'MapboxSpeech.swift', '~> 0.1'

Then import MapboxSpeech or @import MapboxSpeech;.

Basic Usage

// main.swift
import MapboxSpeech

let voice = SpeechSynthesizer(accessToken: "Your Mapbox access token")
let options = SpeechOptions(text: "hello, my name is Bobby")

voice.audioData(with: options) { (data: Data?, error: NSError?) in
    // Do something with the audio!
}

Copyright (c) 2023 MapLibre contributors

About

Natural-sounding text-to-speech in Swift or Objective-C on iOS, macOS, tvOS, and watchOS

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Sponsor this project

  •  

Packages

 
 
 

Contributors

Languages

  • Swift 87.2%
  • Ruby 11.6%
  • Objective-C 1.2%