Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Read API base URL from Info.plist #14

Open
1ec5 opened this issue Jul 18, 2018 · 1 comment
Open

Read API base URL from Info.plist #14

1ec5 opened this issue Jul 18, 2018 · 1 comment
Assignees

Comments

@1ec5
Copy link
Contributor

1ec5 commented Jul 18, 2018

If no host is passed into SpeechSynthesizer(accessToken:host:), the fallback hostname should be either api.mapbox.com or api.mapbox.cn depending on the value of MGLMapboxAPIBaseURL in Info.plist:

baseURLComponents.host = host ?? "api.mapbox.com"

This would be consistent with how we read the access token out of Info.plist:

let accessToken = accessToken ?? defaultAccessToken

This will make it easier for developers to keep their map, directions, and spoken instructions in sync, since SpeechSynthesizer.shared would automatically pick up the API endpoint specified in Info.plist. Developers who need a different value for the speech synthesizer can still override the API base URL when creating a separate SpeechSynthesizer instance.

/ref mapbox/MapboxGeocoder.swift#107
/cc @m-stephen @bsudekum

@m-stephen m-stephen self-assigned this Aug 7, 2018
@m-stephen
Copy link

m-stephen commented Aug 7, 2018

We do not have api voice now in China.

So the solution is now we choose a Chinese TTS service inside China and only make a subclass of RouteVoiceController to custom the voice controller. This swift file can be given to our customers to help them make a custom TTS voice controller quickly.

For further steps, we should setup api voice .cn and integrate Chinese TTS service inside China. So I think, this issue should be fixed after the api-voice China ready. @1ec5

/cc: @suntony @chriswu42

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants