ValueError: operands could not be broadcast together with shapes (400,2) (400,)
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 25/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- python
- Lĩnh vực
- machine-learning
Hướng nghiên cứu
Bắt đầu với lệnh gọi plp(signal, rasta=True) trong script được cung cấp và kiểm tra sidekit/frontend/features.py tại power_spectrum, dòng 399. Tái hiện lỗi với đầu vào WAV được tham chiếu, sau đó theo dõi shape của signal, framed[start:stop, :] và window. Hoàn tất khi quá trình trích xuất PLP không còn gây ra lỗi broadcasting đối với các đầu vào WAV dự kiến.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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()
- Ngôn ngữ chính
- Jupyter Notebook
- Star
- 12.7k
- Fork
- 4.4k
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của rasbt/python-machine-learning-book
-
Python machine learningĐang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 5/100
rasbt/python-machine-learning-book#99 · 1 bình luận ·
-
Graph of curve is misleadingĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 35/100
rasbt/python-machine-learning-book#98 · 1 bình luận ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 25/100
rasbt/python-machine-learning-book#95 · 1 bình luận ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 18/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 55/100
rasbt/python-machine-learning-book#74 · 1 bình luận · 2 reaction ·
Tất cả issue của rasbt/python-machine-learning-book
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
jpata/particleflow#520 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
How is TSS clculated by biomod2Đang mởmodeling question
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
bug claimed difficulty:2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
MakazhanAlpamys/Soup#1731 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
01-openai-gpt/04 section 3 prices the three-way input split without the 1.25x cache-write rateĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
aws-samples/sample-per-model-bedrock#107 ·
Maintainer thường phản hồi trong vòng 1 ngày