ValueError: operands could not be broadcast together with shapes (400,2) (400,)
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 25/100
- issue の種類
- バグ
- 明瞭さ
- 説明が足りない
- 活発さ
- 停滞
- 技術スタック
- python
調査の方向性
提供されたスクリプト内の plp(signal, rasta=True) の呼び出しから始め、sidekit/frontend/features.py の power_spectrum、399 行目を調べてください。参照されている WAV 入力で失敗を再現し、その後 signal、framed[start:stop, :]、window の shape を追跡してください。対象の WAV 入力に対して PLP 抽出で broadcasting エラーが発生しなくなれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Dear concerns : I am extracting features from wav , using PLP , this ( Pyhton 3.6 -Anaconda Spyder ) after execute i am facing error in this line
File "C:\ProgramData\Anaconda3\lib\site-packages\sidekit\frontend\features.py", line 399, in power_spectrum
ahan = framed[start:stop, :] * window
ValueError: operands could not be broadcast together with shapes (400,2) (400,)
#!usr/bin/python
import numpy.matlib
import scipy
from scipy.fftpack.realtransforms import dct
from sidekit.frontend.vad import pre_emphasis
from sidekit.frontend.io import *
from sidekit.frontend.normfeat import *
from sidekit.frontend.features import *
import scipy.io.wavfile as wav
import numpy as np
def readWavFile(wav):
#given a path from the keyboard to read a .wav file
#wav = raw_input('Give me the path of the .wav file you want to read: ')
inputWav = 'C:/Speech_Processing/2-Speech_Signal_Processing_and_Classification-master/feature_extraction_techniques'+wav
return inputWav
#reading the .wav file (signal file) and extract the information we need
def initialize(inputWav):
rate , signal = wav.read(readWavFile(inputWav)) # returns a wave_read object , rate: sampling frequency
sig = wave.open(readWavFile(inputWav))
# signal is the numpy 2D array with the date of the .wav file
# len(signal) number of samples
sampwidth = sig.getsampwidth()
print ('The sample rate of the audio is: ',rate)
print ('Sampwidth: ',sampwidth)
return signal , rate
def PLP():
folder = input('Give the name of the folder that you want to read data: ')
amount = input('Give the number of samples in the specific folder: ')
for x in range(1,int(amount)+1):
wav = '/'+folder+'/'+str(x)+'.wav'
print (wav)
#inputWav = readWavFile(wav)
signal,rate = initialize(wav)
#returns PLP coefficients for every frame
plp_features = plp(signal,rasta=True)
meanFeatures(plp_features[0])
#compute the mean features for one .wav file (take the features for every frame and make a mean for the sample)
def meanFeatures(plp_features):
#make a numpy array with length the number of plp features
mean_features=np.zeros(len(plp_features[0]))
#for one input take the sum of all frames in a specific feature and divide them with the number of frames
for x in range(len(plp_features)):
for y in range(len(plp_features[x])):
mean_features[y]+=plp_features[x][y]
mean_features = (mean_features / len(plp_features))
print (mean_features)
def main():
PLP()
main()
- 主要言語
- Jupyter Notebook
- スター
- 12.7k
- フォーク
- 4.4k
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
rasbt/python-machine-learning-book のほかの issue
-
難易度 5/5 1週間以上 初心者へのやさしさ 5/100
rasbt/python-machine-learning-book#99 · コメント 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 35/100
rasbt/python-machine-learning-book#98 · コメント 1 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 25/100
rasbt/python-machine-learning-book#95 · コメント 1 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 18/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 55/100
rasbt/python-machine-learning-book#74 · コメント 1 件 · リアクション 2 件 ·
rasbt/python-machine-learning-book の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 95/100
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
PriorLabs/TabPFN#1362 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Kalman plugin produces systematic false-positive faults on healthy telemetry対応中かも @musaaero が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
denoise_mixture updates weights with denoised-posterior density instead of the marginal likelihood対応中かも @BHARATH0153 が 1 日前に担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
メンテナーはふだん 2 日以内に返信