小编Jam*_* Fu的帖子

PyAudio无法在Ubuntu 14.04上使用"无法打开奴隶"的麦克风

我已经尝试了几天在我的ubuntu 14.04和PyAudio上使用麦克风.其实我想在github中使用' Speech Recognition '包.

我发现它使用pyaudio内部,它是ubuntu 14.04的噩梦.它显示以下错误消息,无法从麦克风识别我的声音:

ALSA lib pcm_dsnoop.c:618:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dmix.c:1022:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib pcm_dmix.c:1022:(snd_pcm_dmix_open) unable to open slave
Run Code Online (Sandbox Code Playgroud)

我在网站上发现了几个类似的帖子,但没有解决方案.我无法通过麦克风录制我的声音,它只是卡在那里.有人在ubuntu 14.04上成功运行吗?(PyAudio录制语音或语音识别)

python ubuntu pyaudio ubuntu-14.04

5
推荐指数
1
解决办法
1792
查看次数

错误:更新到 4.0.0.2 后无法连接到远程目标

几天前我更新了我的齿轮运动。更新到 4.0.0.2 后,我无法再连接到我的手表。这是我的命令:

./sdb connect [IP]
Run Code Online (Sandbox Code Playgroud)

它说...

error: failed to connect to remote target [IP]
Run Code Online (Sandbox Code Playgroud)

我该如何解决这个问题?

watch samsung-mobile tizen samsung-galaxy-gear tizen-wearable-sdk

4
推荐指数
3
解决办法
9369
查看次数

mapView.addAnnotation()表示"在展开Optional值时意外发现nil"

我尝试从tableView单元格的地址转换为mapView并在地图上显示引脚.

我确信我的代码中的所有内容都不是零.

但Xcode说我的oldValuenil(in didSet{}).我不知道如何解决它.

以下是我的代码:

class MapViewController: UIViewController, MKMapViewDelegate {

    @IBOutlet weak var mapView: MKMapView! {
        didSet {
            mapView.mapType = .Standard
            mapView.delegate = self
        }
    }


    var location:CLLocation? {
        didSet {
            clearWayPoints()
            if location != nil {
                println(location!.coordinate.longitude)
                let coordinate = CLLocationCoordinate2D(latitude: location!.coordinate.latitude, longitude: location!.coordinate.longitude)
                let pin = MapPin(coordinate: coordinate, title: "Current", subtitle: "here")
                setAnnotation(pin)
            }
        }
    }

    private func clearWayPoints() {
        if mapView?.annotations != nil {
            mapView.removeAnnotations(mapView.annotations as [MKAnnotation])
        }
    }

    func setAnnotation(pin: MKAnnotation) …
Run Code Online (Sandbox Code Playgroud)

null mkmapview mkannotation ios swift

2
推荐指数
1
解决办法
1442
查看次数

UITableViewCell中的UIActivityIndi​​catorView(微调器)无法通过swift中的UITableViewController启动动画

我有一个包含UIActivityIndi​​catorView(微调器)的自定义UITableViewCell,我尝试单击该单元格以使微调器开始动画.所以我尝试在UITableViewController中实现以下内容:

override func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) {
    let cell = tableView.dequeueReusableCellWithIdentifier("testcase", forIndexPath: indexPath) as TestCaseTableViewCell
    cell.spinner.startAnimating()
    tableView.deselectRowAtIndexPath(indexPath, animated: true)
}
Run Code Online (Sandbox Code Playgroud)

我的TestCaseTableViewCell(自定义单元类)中有实例变量"spinner":

@IBOutlet weak var spinner: UIActivityIndicatorView!
Run Code Online (Sandbox Code Playgroud)

但它不起作用......

我只想点击单元格,旋转器开始动画,因为我想在这段时间内做点什么.当事情完成后,我可以在单元格中显示类似"OK"的内容(与旋转器的相同位置).我怎样才能做到这一点?

xcode uitableview uiactivityindicatorview ios swift

1
推荐指数
1
解决办法
2545
查看次数