Comments (2)
Hi! I'd like to help you. To better understand and replicate your situation, could you please provide the following information?
- Which version of Python are you using?
- Your code references 'self', indicating it's part of a class. Could you provide more context or the object's class definition.
- It would be helpful to know which libraries you have installed. Running pip freeze in a terminal will list your installed libraries.
Best regards,
from pyaudioanalysis.
Python 3.11
import os
import wave
import pyaudio
import numpy as np
import tkinter as tk
from tkinter import ttk
from tkinter import filedialog
from pydub import AudioSegment
class Full:
def init(self, parent):
self.pa = pyaudio.PyAudio()
self.chunk_size = 1024
self.sample_rate = 44100
self.window = parent
def start_analyzing_WavFile(self):
try:
file_Extension = self.path.split(".")[1].lower()
if file_Extension == "wav":
wavFile = wave.open(self.wavFileName, 'r')
elif file_Extension == "mp3":
cwd = os.getcwd()
sound = AudioSegment.from_mp3(self.wavFileName)
self.wavFileName = f"{cwd}/tmp.wav"
sound.export(self.wavFileName, format="wav")
wavFile = wave.open(self.wavFileName, 'r')
else:
print(f"Unknown Type of File: {file_Extension}")
except IOError as e:
print(u'cant open wavFile file')
else:
with wavFile:
self.stream = self.pa.open(format=self.pa.get_format_from_width(wavFile.getsampwidth()),
channels=wavFile.getnchannels(),
rate=wavFile.getframerate(),
input=True,
frames_per_buffer=self.chunk_size,
stream_callback=self.read_callback)
from pyaudioanalysis.
Related Issues (20)
- ImportError: cannot import name 'available_if' from 'sklearn.utils.metaestimators' HOT 1
- ValueError: evaluate_model_for_folders
- Signal from read_audio_generic causes ValueError in feature_extraction
- error in audioTrainTest.extract_features_and_train if class folder contain only 1 sample
- Plot the wav image Value Error on silence_removal
- AttributeError: module 'pyAudioAnalysis.audioTrainTest' has no attribute 'featureAndTrain'
- Vocale
- Segmentation Based on speaker
- typo in wiki
- Add headers to CSV output with feature names?
- No requirements for pip pyAudioAnalysis?
- How to save pyaudioanalysis svm model in onnx format
- cannot reshape array of size 28800 into shape (480,10) HOT 1
- mportError: cannot import name 'audioFeatureExtraction' from 'pyAudioAnalysis' HOT 3
- invalid syntax for print method in analyzeMovieSound
- Add Pypi long description
- Is it possible to set shortTermWindow to be shorter? HOT 1
- Generate ShortTermFeatures for an audio signal of 0.1 seconds of a mono, 16KHz and PCM wave file HOT 3
- open wav file for analyse HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pyaudioanalysis.