小编Sha*_*que的帖子

Dialogflow 列表第一次在 Google 助理上不起作用

我的 Dialogflow 代理正在使用“Google 富消息上的操作”列表响应对象来显示 Google 助理平台上的选项。

在 Dialogflow 控制台上进行测试时,列表选项可以完美运行。但是,在移动设备上通过 Google Assistant Simulator 或 Google Assistant 应用程序进行测试时,列表选项在第一次尝试时不起作用。它仅在第二次选择选项时有效。

任何指导将不胜感激。

chatbot google-cloud-platform actions-on-google api-ai dialogflow-es

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

提高 Google Cloud Speech API 的准确性

我目前正在 Mac OS 计算机上从网页录制音频,并通过云语音 api 运行它以生成成绩单。但是,结果并不那么准确,并且结果中存在大量缺失的单词。

是否有任何步骤可以帮助我产生更准确的结果?

以下是我将音频转换为文本的步骤:

  1. 使用 Soundflower 将音频输出从我的声卡传送到麦克风。
  2. 从网站播放音频
  3. 使用 quickTime 播放器录制保存为 .m4a 文件的音频。
  4. 使用命令行工具 ffmpeg 将 .m4a 文件转换为 .flac,并将 2 个音频通道(立体声)合并为 1 个音频通道(单声道)。
  5. 将 .flac 文件上传到 Google Cloud Storage。该文件的采样率为 44100Hz,每个样本有 24 位。
  6. 通过 node.js 客户端库使用 longRunningRecognize api,指向 Google 云存储中的文件。

ffmpeg speech-to-text node.js google-cloud-speech

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

如何使用 MvxRecyclerView 在 MvvmCross 中实现 Recycler View

在 MvvmCross 中,我在一个有效的 Activity 中有一个 android listview。

我在某处读到将 listView 更改为 recyclerView 就像在我的布局 .axml 文件中将 MvxListView 更改为 MvxRecyclerView 一样简单。尝试这给了我以下运行时异常:

Android.Views.InflateException: Binary XML file line #1: Binary XML file line #1: Error inflating class Mvx.MvxRecyclerView
Run Code Online (Sandbox Code Playgroud)

使用 MvxRecyclerView 时,我必须在背后的代码或视图模型中做些什么不同的事情吗?下面是我的代码。

布局文件:

主文件

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:local="http://schemas.android.com/apk/res-auto"
    android:orientation="vertical"
    android:layout_width="match_parent"
    android:layout_height="match_parent">
    <Mvx.MvxRecyclerView
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:scrollbars="vertical"
        android:id="@+id/words_listview"
        local:MvxItemTemplate="@layout/words_listview_row"
        local:MvxBind="ItemsSource Words" />
</LinearLayout> 
Run Code Online (Sandbox Code Playgroud)

words_listview_row.axml

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:p1="http://schemas.android.com/apk/res/android"
    xmlns:local="http://schemas.android.com/apk/res-auto"
    p1:minWidth="25px"
    p1:minHeight="25px"
    p1:layout_width="match_parent"
    p1:layout_height="match_parent"
    p1:id="@+id/relativeLayout1"
    p1:background="#FFFFFF">
    <TextView
        p1:text="Word name"
        p1:layout_width="wrap_content"
        p1:layout_height="wrap_content"
        p1:id="@+id/headingTextView"
        p1:width="325dp"
        p1:textColor="#000000"
        p1:layout_alignParentLeft="true"
        p1:textSize="18sp" …
Run Code Online (Sandbox Code Playgroud)

data-binding xamarin.android mvvmcross xamarin

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