使用python查找音频中的语音速度和语调 [英] finding speed and tone of speech in an audio using python

查看:276
本文介绍了使用python查找音频中的语音速度和语调的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

给出一个音频,我想计算讲话的速度.即快或慢.

Given an audio , I want to calculate the pace of the speech. i.e how fast or slow is it.

当前我正在执行以下操作:
-将语音转换为文本并获得成绩单(使用免费工具).
-计算成绩单中的单词数.
-计算文件的长度或持续时间.
-最后, pace =(抄本中的单词数/文件的持续时间).

Currently I am doing the following:
- convert speech to text and obtaining a transcript (using a free tool).
- count number of words in transcript.
- calculate length or duration of file.
- finally, pace = (number of words in transcript / duration of file).

但是,获得的速度的准确性完全取决于转录,我认为这是不必要的步骤.

However the accuracy of the pace obtained is dependent purely on transcription , which I think is an unnecessary step.

是否有任何可以使我能够使用python-library/sox/ffmpeg的方式

Is there any python-library/sox/ffmpeg way that will enable me to

  • 以一种简单的方式来计算音频中的通话速度/步幅
  • 该音频的主要音高/音调?
  • to calculate, in a straightforward way,the speed/pace of talk in an audio
  • dominant Pitches/tones of that audio?

我推荐了:我推荐了: http://sox.sourceforge.net/sox.html https://digitalcardboard.com/blog/2009/08/25/the-sox-of-silence/

I referred : I referred : http://sox.sourceforge.net/sox.html and https://digitalcardboard.com/blog/2009/08/25/the-sox-of-silence/

推荐答案

您的方法听起来像是一阶快速逼近法,但受到笔录分辨率的限制.您可以直接分析音频文件.

Your method sounds interesting as a quick first-order approximation, but limited by the transcript resolution. You can analyze directly the audio file.

我不熟悉Sox,但是从他们的手册看来, stat 选项提供了"...有关音频的时域和频域统计信息"

I'm not familiar with Sox, but from their manual seems like the stat option gives "... time and frequency domain statistical information about the audio"

Sox声称是瑞士军方的音频操纵刀" ,仅仅浏览一下他们的文档似乎就很适合您找到一般的节奏.

Sox claims to be a "Swiss Army knife of audio manipulation", and just by skimming through their docs seems like it might suit you to find the general tempo.

如果您也想运行音高分析,那么您可以使用python开发自己的算法-我最近使用了 librosa ,发现它非常有用并且有据可查.

If you want to run pitch analysis too, then you can develop your own algorithm with python - I recently used librosa and found it very useful and well documented.

这篇关于使用python查找音频中的语音速度和语调的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆