Skip to content
This repository has been archived by the owner on Aug 22, 2018. It is now read-only.

smart formatting property is not available #41

Closed
KiranPatelSpaceo opened this issue Aug 17, 2016 · 6 comments
Closed

smart formatting property is not available #41

KiranPatelSpaceo opened this issue Aug 17, 2016 · 6 comments

Comments

@KiranPatelSpaceo
Copy link

KiranPatelSpaceo commented Aug 17, 2016

let confSTT: STTConfiguration = STTConfiguration()
confSTT.basicAuthUsername = "XYZ"
confSTT.basicAuthPassword = "XYZ"
confSTT.audioCodec = WATSONSDK_AUDIO_CODEC_TYPE_OPUS
confSTT.modelName = strBroadbandName
confSTT.continuous = true

How to set property smart_formatting = true or false ?

@mihui
Copy link
Collaborator

mihui commented Aug 17, 2016

Hi @kiran5232 ,

so far this repo does not support it, as there are several PR conflicts needs to be resolved, meanwhile, you can try my forked repository: https://github.com/mihui/speech-ios-sdk, it was based on this repository and with some enhancements, but we didn't have any reviews yet.

So in that repository, you can use:

confSTT.smartFormatting = true

@nacho4d , please consider to add some more configurations to keep this repository up-to-date, smart formatting was the latest release of STT.

@nacho4d
Copy link
Collaborator

nacho4d commented Aug 18, 2016

I have noticed there is a lot of parameters not supported and it could be more in the future. So, I have created NSDictonary<NSString *, NSObject*> *additionaParameters to address this and future new parameters. Please look at #42

The objective-c sample app shows how to send "smart_formatting":

[confSTT setAdditionalParameters:@{@"smart_formatting": @(YES)}];

@mihui If you have time, could you take a look at this please? Maybe my english pronunciation is not very good to check this case.

@mihui
Copy link
Collaborator

mihui commented Aug 18, 2016

@nacho4d thanks, that's a very good solution for future use, however it will confuse the developers about which is additional parameter, and it will cause mistakes if the developer do not understand how to organize them, see the models created from ios-sdk:
https://github.com/watson-developer-cloud/ios-sdk/tree/master/Source/SpeechToTextV1/Models

So I suggest to have explicitly defined variables/properties as we did before. :)

nacho4d added a commit to nacho4d/speech-ios-sdk that referenced this issue Sep 3, 2016
@nacho4d
Copy link
Collaborator

nacho4d commented Sep 3, 2016

Sorry it took this long. I was busy with other suff then I completely forgot about it :(

@mihui I have removed additionalParameters and copied most of your branch getStartMessage method.

If no problems it can be merged right away. Otherwise I will do it in a couple of days...

@mihui
Copy link
Collaborator

mihui commented Sep 3, 2016

Hey @nacho4d , understood. I see the code, please go ahead and merge. Thanks.

@nacho4d
Copy link
Collaborator

nacho4d commented Sep 3, 2016

Thanks! I have merged it. I am closing this issue too since it is addressed now.

@nacho4d nacho4d closed this as completed Sep 3, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants