Skip to content

Commit 0b78197

Browse files
committed
Updated ACRCloud SDK to v1.6.2.1
1 parent 4970875 commit 0b78197

File tree

19 files changed

+589
-34
lines changed

19 files changed

+589
-34
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## 0.1.4
2+
3+
* Updated ACRCloud SDK to v1.6.2.1
4+
* This should also fix issues with running apps on the iOS simulator.
5+
16
## 0.1.3
27

38
* **BREAKING**: Renamed `volume` to `volumeStream`. It is now just a normal `Stream` instead of a `BehaviorSubject`.

example/ios/Flutter/AppFrameworkInfo.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@
2121
<key>CFBundleVersion</key>
2222
<string>1.0</string>
2323
<key>MinimumOSVersion</key>
24-
<string>8.0</string>
24+
<string>9.0</string>
2525
</dict>
2626
</plist>

example/ios/Podfile.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ EXTERNAL SOURCES:
1414
:path: ".symlinks/plugins/flutter_acrcloud/ios"
1515

1616
SPEC CHECKSUMS:
17-
Flutter: 434fef37c0980e73bb6479ef766c45957d4b510c
18-
flutter_acrcloud: 85096e0649217498fccd1cbe4a30d6bda7734b74
17+
Flutter: 50d75fe2f02b26cc09d224853bb45737f8b3214a
18+
flutter_acrcloud: e14db5dc29b45fa29428d1c4ef7696c3f5cb60f8
1919

2020
PODFILE CHECKSUM: aafe91acc616949ddb318b77800a7f51bffa2a4c
2121

22-
COCOAPODS: 1.10.0
22+
COCOAPODS: 1.11.2

example/ios/Runner.xcodeproj/project.pbxproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@
359359
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
360360
GCC_WARN_UNUSED_FUNCTION = YES;
361361
GCC_WARN_UNUSED_VARIABLE = YES;
362-
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
362+
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
363363
MTL_ENABLE_DEBUG_INFO = NO;
364364
SDKROOT = iphoneos;
365365
SUPPORTED_PLATFORMS = iphoneos;
@@ -444,7 +444,7 @@
444444
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
445445
GCC_WARN_UNUSED_FUNCTION = YES;
446446
GCC_WARN_UNUSED_VARIABLE = YES;
447-
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
447+
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
448448
MTL_ENABLE_DEBUG_INFO = YES;
449449
ONLY_ACTIVE_ARCH = YES;
450450
SDKROOT = iphoneos;
@@ -493,7 +493,7 @@
493493
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
494494
GCC_WARN_UNUSED_FUNCTION = YES;
495495
GCC_WARN_UNUSED_VARIABLE = YES;
496-
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
496+
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
497497
MTL_ENABLE_DEBUG_INFO = NO;
498498
SDKROOT = iphoneos;
499499
SUPPORTED_PLATFORMS = iphoneos;

example/pubspec.lock

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ packages:
77
name: async
88
url: "https://pub.dartlang.org"
99
source: hosted
10-
version: "2.6.1"
10+
version: "2.8.1"
1111
boolean_selector:
1212
dependency: transitive
1313
description:
@@ -28,7 +28,7 @@ packages:
2828
name: charcode
2929
url: "https://pub.dartlang.org"
3030
source: hosted
31-
version: "1.2.0"
31+
version: "1.3.1"
3232
clock:
3333
dependency: transitive
3434
description:
@@ -61,7 +61,7 @@ packages:
6161
path: ".."
6262
relative: true
6363
source: path
64-
version: "0.1.3"
64+
version: "0.1.4"
6565
flutter_test:
6666
dependency: "direct dev"
6767
description: flutter
@@ -73,7 +73,7 @@ packages:
7373
name: json_annotation
7474
url: "https://pub.dartlang.org"
7575
source: hosted
76-
version: "4.0.1"
76+
version: "4.3.0"
7777
matcher:
7878
dependency: transitive
7979
description:
@@ -87,7 +87,7 @@ packages:
8787
name: meta
8888
url: "https://pub.dartlang.org"
8989
source: hosted
90-
version: "1.3.0"
90+
version: "1.7.0"
9191
path:
9292
dependency: transitive
9393
description:
@@ -141,7 +141,7 @@ packages:
141141
name: test_api
142142
url: "https://pub.dartlang.org"
143143
source: hosted
144-
version: "0.3.0"
144+
version: "0.4.2"
145145
typed_data:
146146
dependency: transitive
147147
description:
@@ -157,5 +157,5 @@ packages:
157157
source: hosted
158158
version: "2.1.0"
159159
sdks:
160-
dart: ">=2.12.0 <3.0.0"
160+
dart: ">=2.14.0 <3.0.0"
161161
flutter: ">=1.10.0"
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>AvailableLibraries</key>
6+
<array>
7+
<dict>
8+
<key>HeadersPath</key>
9+
<string>Headers</string>
10+
<key>LibraryIdentifier</key>
11+
<string>ios-arm64_x86_64-maccatalyst</string>
12+
<key>LibraryPath</key>
13+
<string>libACRCloud_IOS_SDK.a</string>
14+
<key>SupportedArchitectures</key>
15+
<array>
16+
<string>arm64</string>
17+
<string>x86_64</string>
18+
</array>
19+
<key>SupportedPlatform</key>
20+
<string>ios</string>
21+
<key>SupportedPlatformVariant</key>
22+
<string>maccatalyst</string>
23+
</dict>
24+
<dict>
25+
<key>HeadersPath</key>
26+
<string>Headers</string>
27+
<key>LibraryIdentifier</key>
28+
<string>ios-arm64_armv7</string>
29+
<key>LibraryPath</key>
30+
<string>libACRCloud_IOS_SDK.a</string>
31+
<key>SupportedArchitectures</key>
32+
<array>
33+
<string>arm64</string>
34+
<string>armv7</string>
35+
</array>
36+
<key>SupportedPlatform</key>
37+
<string>ios</string>
38+
</dict>
39+
<dict>
40+
<key>HeadersPath</key>
41+
<string>Headers</string>
42+
<key>LibraryIdentifier</key>
43+
<string>ios-arm64_i386_x86_64-simulator</string>
44+
<key>LibraryPath</key>
45+
<string>libACRCloud_IOS_SDK.a</string>
46+
<key>SupportedArchitectures</key>
47+
<array>
48+
<string>arm64</string>
49+
<string>i386</string>
50+
<string>x86_64</string>
51+
</array>
52+
<key>SupportedPlatform</key>
53+
<string>ios</string>
54+
<key>SupportedPlatformVariant</key>
55+
<string>simulator</string>
56+
</dict>
57+
</array>
58+
<key>CFBundlePackageType</key>
59+
<string>XFWK</string>
60+
<key>XCFrameworkFormatVersion</key>
61+
<string>1.0</string>
62+
</dict>
63+
</plist>
Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
//
2+
// ACRCloud_Config.h
3+
// ACRCloud_IOS_SDK
4+
//
5+
// Created by olym on 15/3/25.
6+
// Copyright (c) 2015年 ACRCloud. All rights reserved.
7+
//
8+
9+
#import <Foundation/Foundation.h>
10+
11+
typedef enum {
12+
rec_mode_remote = 0, //query remote db
13+
rec_mode_local = 1, //query local db
14+
rec_mode_both = 2, // query both remote db and local db
15+
rec_mode_advance_remote = 3 //query remote db and saving recording fingerprint when offline.
16+
}ACRCloudRecMode;
17+
18+
typedef enum {
19+
rec_data_audio = 0, //rec audio data
20+
rec_data_humming = 1, //rec humming data
21+
rec_data_both = 2 //rec both
22+
}ACRCloudRecData;
23+
24+
typedef enum {
25+
result_type_error = -1,
26+
result_type_none = 0,
27+
result_type_audio = 1,
28+
result_type_live = 2,
29+
result_type_audio_live = 3,
30+
}ACRCloudResultType;
31+
32+
typedef enum {
33+
http_resume_type_error = -1,
34+
http_resume_type_resume = 0,
35+
http_resume_type_restart = 1,
36+
http_resume_type_success = 2,
37+
} HTTPResumeType;
38+
39+
#define ACRCLOUD_VERSION @"1.0"
40+
41+
42+
typedef void(^ACRCloudResultBlock)(NSString *result, ACRCloudResultType resMode);
43+
typedef void(^ACRCloudResultWithFpBlock)(NSString *result, NSData *fingerprint);
44+
typedef void(^ACRCloudResultWithDataBlock)(NSString *result, NSData *data);
45+
46+
typedef void(^ACRCloudStateBlock)(NSString *state);
47+
48+
typedef void(^ACRCloudVolumeBlock)(float volume);
49+
50+
@interface ACRCloudConfig : NSObject
51+
{
52+
NSString *_accessKey;
53+
NSString *_accessSecret;
54+
NSString *_host;
55+
NSString *_audioType;
56+
NSString *_homedir;
57+
NSString *_uuid;
58+
NSString *_protocal;
59+
NSDictionary *_params;
60+
ACRCloudRecMode _recMode;
61+
ACRCloudRecData _recDataType;
62+
NSInteger _requestTimeout;
63+
NSInteger _prerecorderTime;
64+
NSInteger _keepPlaying;
65+
NSUInteger _audioSessionCategory; //default 1, support bluetooth and airplay
66+
ACRCloudResultBlock _resultBlock;
67+
ACRCloudStateBlock _stateBlock;
68+
ACRCloudVolumeBlock _volumeBlock;
69+
ACRCloudResultWithFpBlock _resultFpBlock;
70+
ACRCloudResultWithDataBlock _resultDataBlock;
71+
}
72+
73+
@property(nonatomic, retain) NSString *accessKey;
74+
@property(nonatomic, retain) NSString *accessSecret;
75+
@property(nonatomic, retain) NSString *host;
76+
@property(nonatomic, retain) NSString *audioType;
77+
@property(nonatomic, retain) NSString *homedir;
78+
@property(nonatomic, retain) NSString *uuid;
79+
@property(nonatomic, retain) NSString *protocol;
80+
@property(nonatomic, retain) NSDictionary *params;
81+
@property(nonatomic, assign) ACRCloudRecMode recMode;
82+
@property(nonatomic, assign) ACRCloudRecData recDataType;
83+
@property(nonatomic, assign) NSInteger requestTimeout;
84+
@property(nonatomic, assign) NSInteger prerecorderTime;
85+
@property(nonatomic, assign) NSInteger keepPlaying;
86+
@property(nonatomic, assign) NSUInteger audioSessionCategory;
87+
@property(nonatomic, copy) ACRCloudResultBlock resultBlock;
88+
@property(nonatomic, copy) ACRCloudStateBlock stateBlock;
89+
@property(nonatomic, copy) ACRCloudVolumeBlock volumeBlock;
90+
@property(nonatomic, copy) ACRCloudResultWithFpBlock resultFpBlock;
91+
@property(nonatomic, copy) ACRCloudResultWithDataBlock resultDataBlock;
92+
93+
@end
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
//
2+
// ACRCloud_IOS_SDK.h
3+
// ACRCloud_IOS_SDK
4+
//
5+
// Created by olym on 15/3/24.
6+
// Copyright (c) 2015年 ACRCloud. All rights reserved.
7+
//
8+
9+
#import <Foundation/Foundation.h>
10+
#import "ACRCloudConfig.h"
11+
12+
@interface ACRCloudRecognition : NSObject
13+
14+
-(id)initWithConfig:(ACRCloudConfig*)config;
15+
16+
-(void)startPreRecord:(NSInteger)recordTime;
17+
-(void)stopPreRecord;
18+
19+
-(void)startRecordRec;
20+
21+
-(void)stopRecordRec;
22+
23+
-(void)stopRecordAndRec;
24+
25+
//only support RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16 bit, mono 8000 Hz
26+
-(NSString*)recognize:(char*)buffer len:(int)len;
27+
28+
//only support RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16 bit, mono 8000 Hz
29+
-(NSString*)recognize:(NSData*)pcm_data;
30+
31+
-(void)recognize_fp:(NSData*)fingerprint
32+
resultBlock:(ACRCloudResultBlock)resultBlock;
33+
34+
-(NSString*)recognize_fp:(NSData*)fingerprint;
35+
-(NSString*)recognize_hum_fp:(NSData*)fingerprint;
36+
37+
//only support RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16 bit, mono 8000 Hz
38+
+(NSData*)get_fingerprint:(char*)pcm len:(int)len;
39+
+(NSData*)get_fingerprint:(NSData*)pcm;
40+
+(NSData*)get_hum_fingerprint:(NSData*)pcm;
41+
42+
+(NSData*) get_fingerprint:(char*)pcm
43+
len:(unsigned)len
44+
sampleRate:(unsigned)sampleRate
45+
nChannel:(short)nChannel;
46+
+(NSData*)get_fingerprint:(NSData*)pcm
47+
sampleRate:(unsigned)sampleRate
48+
nChannel:(short)nChannel;
49+
50+
//convert pcm/wav to mono 8000HZ
51+
+(NSData*) resample:(NSData*)pcm
52+
sampleRate:(unsigned)sampleRate
53+
nChannel:(short)nChannel;
54+
55+
+(NSData*) resample:(char*)pcm
56+
len:(unsigned)len
57+
sampleRate:(unsigned)sampleRate
58+
nChannel:(short)nChannel;
59+
60+
+(NSData*) resample_bit32:(char*)pcm
61+
len:(unsigned)bytes
62+
sampleRate:(unsigned)sampleRate
63+
nChannel:(short)nChannel
64+
isFloat:(bool)isFloat;
65+
66+
+(NSString*) version;
67+
@end
831 KB
Binary file not shown.

0 commit comments

Comments
 (0)