Questions tagged [wave]

This tag is for questions about the Python module wave - for working with the .wav sound format. FOR GENERAL WAV QUESTIONS, not related to Python, please use the [wav] tag.

The wave module provides a convenient interface to the WAV sound format. It does not support compression/decompression, but it does support mono/stereo.

It's recommended to use this tag in connection with , due to the colloquial meaning of wave (ex. in math or physics)

498 questions
4
votes
1 answer

Python: Visualisation of waves

I want to programm an easy visualisation of wave propagation. I tried this with visual python (VPython) but the programm is very slow. I want to use a 2-D visualisation now. Which module could you recommend? Tkinter? Matplotlib? For the…
kame
  • 20,848
  • 33
  • 104
  • 159
4
votes
2 answers

Simultaneous record audio from mic and play it back with effect in python

My goal is to record my voice through the laptop mic and simultaneously adding an effect to it, in python. What I need is similar to a music effects pedal where you connect a guitar or mic and it adds reverb or echo or distortion, etc. I am using…
Leonardo Lopez
  • 1,113
  • 6
  • 20
  • 39
4
votes
2 answers

How create .wav file with a custom frequency tone / wave?

I have a problem with my wave generator. I'm trying to create a .wav file with sound of given frequency. The code I use: $freqOfTone = 21000; $sampleRate = 44100; $samplesCount = 80000; $amplitude = 0.25 * 32768; $w = 2 * pi() * $freqOfTone /…
Sirtarius
  • 128
  • 8
3
votes
1 answer

How to get 24-bit samples from USB audio device using Python?

I am trying to get a stream of 24-bit audio samples from some USB audio device using Python. I already searched for some solutions and found this thread that is using PyAudio stream with a format of pyaudio.paInt24, unfortunately I still got 16-bit…
3
votes
1 answer

Python How to convert pyaudio bytes into virtual file?

In Short Is there a way to convert raw audio data (obtained by PyAudio module) into the form of virtual file (can be obtained by using python open() function), without saving it to the disk and read it from the disk? Details are provided as…
Lee
  • 63
  • 6
3
votes
1 answer

How to adjust pitch using python wave module

so I changed the playback speed of my output.wav file using python wave module frame rate method and multiplying previous frame rate by 2, but I want to keep the pitch of the new output.wav the same, because it sounds high pitch. How to do? This is…
Gjison Giocf
  • 145
  • 1
  • 11
3
votes
0 answers

Change audio sampling rate without affecting playback speed

I'm just trying to change the sampling rate of a audio dataset (in .wav format) from 32000Hz to 44100Hz but, doing this, the playback speed is changed too (very acceptable and logical). My point is, how can i do this change without modify the…
Desc133
  • 41
  • 2
3
votes
2 answers

"wave.Error: unknown format: 3" after using librosa.resample. Is there anything wrong with the output of librosa?

I have a .wav file with a sample rate of 44.1khz, I want to resample it into 16khz by using librosa.resample. Though the output.wav sounds great, and it is 16khz, but I got an error when I'm trying to read it by wave.open. and this problem is quite…
Range
  • 31
  • 1
  • 6
3
votes
1 answer

How can I decode an encoded attachment using RIDE functions?

The attachment is Base58 encoded, but the only Base58 decode method in ride requires the input to be string. How to convert bytevector to string? When an account script is processing a transaction does it see the attachment sent as Base58 encoded of…
Grozz
  • 8,317
  • 4
  • 38
  • 53
3
votes
0 answers

Get frequency value (hz) in split wav audio file by python

I have simple case, i'm recording bee sound in Bee have by python pyAudio. After recording i have to split this record in 10 sec chunks and analyze this chunks by python wave, numpy or python scipy, numpy, i don't know what is easiest way. I would…
3
votes
1 answer

Saving files using Carrierwave without forms

I have 2 models - Album and AlbumImage. Each album has album images associated with them, and they are uploaded via the AlbumImageUploader class using Carrierwave. Now I want to select an album cover for each album using the existing associated…
Jonathan Chiu
  • 1,637
  • 2
  • 16
  • 25
3
votes
2 answers

Python, using print() and replace() function to interpret code given by string

Say I have a code given in a string for example: str(00012333210-1) The numbers relate to a certain amplitude on a wave I wish to graph. I want to transform the code into a printable wave where the numbers are replaced by asterisks such as: 3: …
AJ4314
  • 29
  • 4
3
votes
2 answers

How can i make the sound louder with Naudio c#?

I am trying to increase the amplitude of the sound wave in my code. I have the buffer consisting of all the bytes needed to make the wave. Here is my code for the audio Playback: public void AddSamples(byte[] buffer) { //somehow adjust the…
Computeshorts
  • 596
  • 1
  • 7
  • 25
3
votes
1 answer

boto3 S3 Object Parsing

I'm trying to write a Python script for processing audio data stored on S3. I have an S3 object which I'm calling using def grabAudio(filename, directory): obj = s3client.get_object(Bucket=bucketname, Key=directory+'/'+filename) return…
jmkmay
  • 1,441
  • 11
  • 21
3
votes
3 answers

CSS curve wave background

I am a new learner of html and css. I want to make my circle orange background curve wave using only css not using background-image or svg. Like the screenshot: https://i.stack.imgur.com/rDQeY.png Without using background image curve just css in…