Soundlinks 0.1.6

Soundlinks 0.1.6

测试已测试
Lang语言 Obj-CObjective C
许可 MIT
发布上次发布2016年3月

LiQingyao维护。



  • 作者
  • liqingyao

功能

Soundlinks提供了解析含有隐含信息的音频内容的基礎API。

使用

要运行示例项目,克隆仓库,并首先从Example目录中运行pod install

初始化Soundlinks

AppDelegate中,使用Appid和Eventid初始化Soundlinks。

[Soundlinks setAppID:@"appid" andEventId:@"eventid"];

启动Soundlinks

ViewDidLoad中设置代理并开始麦克风录音。

[Soundlinks setDelegate:self];
[Soundlinks enable];

停止Soundlinks

停止麦克风,不再录音。

[Soundlinks disable];

Soundlinks回调

当Soundlinks监听到一些内容时,会调用回调。返回的内容封装到一个数组中,使用SLContent解析每个内容。

- (void)soundlinks:(Soundlinks *)soundlinks listenContents:(NSArray *)contentArray {
    for (SLContent *content in contentArray) {
        NSLog(@"Succeed Get Content: %@ \n %@ \n %@ \n", content.title, content.url, content.image);
        // To do with the content
    }
}

不要忘记

Info.plist中添加App Transport Security设置,并将Allow Arbitrary Loads设置为YES

构建要求

iOS

  • 7.0+

框架

iOS

  • Foundation

  • AudioToolbox

  • AVFoundation

  • UIKit

  • QuartzCore

安装

Soundlinks可以通过CocoaPods获取。要安装它,只需将以下行添加到您的Podfile中

pod 'Soundlinks'

许可

Soundlinks在MIT许可下可用。有关更多信息,请参阅LICENSE文件。