Skip to content

AWSTranscribeStreamingItem should contains 'confidence' attribute according docs #5553

@SlavianaK

Description

@SlavianaK

AWSTranscribeStreaming

According to docs there should be this attribute
https://docs.aws.amazon.com/transcribe/latest/APIReference/API_streaming_Item.html

Not exists in SDK

@interface AWSTranscribeStreamingItem : AWSModel

Our implementation
AWSTranscribeStreamingModel.h

/**
 <p>A word or phrase transcribed from the input audio.</p>
 */
@interface AWSTranscribeStreamingItem : AWSModel

@property (nonatomic, strong) NSNumber * _Nullable confidence;
/**
 <p>The word or punctuation that was recognized in the input audio.</p>
 */
@property (nonatomic, strong) NSString * _Nullable content;

/**
 <p>The offset from the beginning of the audio stream to the end of the audio that resulted in the item.</p>
 */
@property (nonatomic, strong) NSNumber * _Nullable endTime;

/**
 <p>The offset from the beginning of the audio stream to the beginning of the audio that resulted in the item.</p>
 */
@property (nonatomic, strong) NSNumber * _Nullable startTime;

AWSTranscribeStreamingModel.m

@implementation AWSTranscribeStreamingResult

+ (BOOL) supportsSecureCoding {
    return YES;
}

+ (NSDictionary *)JSONKeyPathsByPropertyKey {
	return @{
             @"alternatives" : @"Alternatives",
             @"endTime" : @"EndTime",
             @"isPartial" : @"IsPartial",
             @"resultId" : @"ResultId",
             @"startTime" : @"StartTime",
             @"confidence" : @"Confidence",
             };
}

+ (NSValueTransformer *)alternativesJSONTransformer {
    return [NSValueTransformer awsmtl_JSONArrayTransformerWithModelClass:[AWSTranscribeStreamingAlternative class]];
}

@end

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions