This demo provides an example of how to integrate the SpeechSuper iOS Objective-C SDK into your iOS app for pronunciation assessment. Follow these steps to get started:
-
Open the file
RecorderDemo/ViewController.m
. -
Insert your
appKey
andsecretKey
into the following lines:NSString *appKey = @"Insert your appKey here"; NSString *secretKey = @"Insert your secretKey here";
-
Open the file
RecorderDemo/evalScences/Controller/TestViewController.m
. -
Modify the input parameters according to your needs in the following code block:
- (void)startSkegn { ... [appDic setValue:@"userId" forKey:@"userId"]; NSMutableDictionary *audioDic = [NSMutableDictionary dictionary]; [audioDic setValue:@"wav" forKey:@"audioType"]; [audioDic setValue:@16000 forKey:@"sampleRate"]; [audioDic setValue:@1 forKey:@"channel"]; [audioDic setValue:@2 forKey:@"sampleBytes"]; NSMutableDictionary *requestDic = [NSMutableDictionary dictionary]; [requestDic setValue:self.coreType forKey:@"coreType"]; [requestDic setValue:self.testString forKey:@"refText"]; NSMutableDictionary *paramDic = [NSMutableDictionary dictionary]; [paramDic setValue:appDic forKey:@"app"]; [paramDic setValue:audioDic forKey:@"audio"]; [paramDic setValue:requestDic forKey:@"request"]; [paramDic setValue:@"native" forKey:@"coreProvideType"]; NSString *jsonString = [self objectToJsonString:paramDic]; ... }
- Run the application on your iOS device or simulator.
- Click on the item on the screen to navigate to the evaluation screen.
- On the evaluation screen, click the "Start Record" button to begin recording and evaluation.
- Click the "End" button to stop recording and await the result.
Now you're ready to use the SpeechSuper iOS Objective-C SDK in your iOS app.