我已经尝试了几天在我的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录制语音或语音识别)
几天前我更新了我的齿轮运动。更新到 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
我尝试从tableView单元格的地址转换为mapView并在地图上显示引脚.
我确信我的代码中的所有内容都不是零.
但Xcode说我的oldValue是nil(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) 我有一个包含UIActivityIndicatorView(微调器)的自定义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"的内容(与旋转器的相同位置).我怎样才能做到这一点?
ios ×2
swift ×2
mkannotation ×1
mkmapview ×1
null ×1
pyaudio ×1
python ×1
tizen ×1
ubuntu ×1
ubuntu-14.04 ×1
uitableview ×1
watch ×1
xcode ×1