【问题标题】:How to find the location of a specific word in an audio file?如何在音频文件中查找特定单词的位置?
【发布时间】:2016-02-15 11:34:46
【问题描述】:

我正在为媒体相关工作开发一个安卓应用程序。在这个应用程序中,我有一个录制的声音文件,它是flac 格式(你可以忘记格式,我可以转换它)。声音文件将播放如下.....

I am here my friend <silence> just do it soon

现在,如果我的注意力只集中在 friend 这个词上。有什么方法可以让我找出这个词 friend 在声音文件中的确切位置?例如,如果声音文件有 10 秒长,那么它应该告诉我单词 friend 介于 0.2 - 0.4 秒之间或类似的东西。

有什么想法吗?

【问题讨论】:

    标签: android audio media audio-recording flac


    【解决方案1】:

    我用这个 Watson api 做了一个类似的应用程序: https://www.ibm.com/smarterplanet/us/en/ibmwatson/developercloud/doc/speech-to-text/

    将声音转换为文本,然后使用 json 搜索响应。

        {
      "result_index": 0,
      "results": [
        {
          "final": true,
          "alternatives": [
            {
              "transcript": "hello world",
              "confidence": 0.9,
              "timestamps": [["hello",0.0,1.2],["world",1.2,2.5]],
              "word_confidence": [["hello",0.95],["world",0.866]]
            }
          ]
        }
      ]
    }
    

    【讨论】:

    • 文本输出不是问题,问题在于准确找到声音文件中特定单词出现在哪个位置(从哪一秒到哪一秒之间)。
    • 回复包括第二个,我编辑了答案
    • 哦,这很有趣,有安卓示例吗?
    • 我们有一个转换音频的 php 脚本,我们得到了响应。你也可以用 nodejs 来做。
    猜你喜欢
    • 2017-11-14
    • 1970-01-01
    • 2021-10-18
    • 2013-08-05
    • 2019-05-31
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多