wav

Why won't this code play a converted wav2c header file through an arduino to my speaker?

旧街凉风 提交于 2019-12-11 17:09:38
问题 I used this converter wav2c to convert a .wav file to a C that I can put in a header file. I was able to put converted audio into the h file but the program where I reference it does not seem to be working correctly. The code compiles and uploads to the Arduino but no sound plays. I used the code here to implement the converted audio. I'm using an 8-ohm 0.25w speaker. I'm no programmer nor an expert at electronics so it's likely something dumb that I did wrong. Any help is much appreciated!

PHP- 2 bytes into 1 array

无人久伴 提交于 2019-12-11 15:32:59
问题 I have printed out this binary which is 8 per line but yet to be stored in an array. <?php // get contents of a file into a string $filename = "rock.wav"; $handle = fopen($filename, "rb"); $contents = fread($handle, filesize($filename)); for($i = 0; $i < strlen($contents); $i++) { $char = $contents[$i]; $str = ord ($char); echo str_pad(decbin($str), 8,"0",STR_PAD_LEFT)."<br/>"; } ?> The outcome is this: 01010010 01001001 01000110 01000110 00000010 it actually has more likely ten thousand line

Wav file from microphone on Python

时间秒杀一切 提交于 2019-12-11 15:26:52
问题 My project is to do speaker recognition using a microphone. I'm using the speeh_recognition library to extract my microphone audio, but the object's class is 'speech_recognition.AudioData' and i don't know how to convert it into a wav file (in order to use librosa for example to then get audio features and maybe recognize the speaker). Could someone please help me on that ? I have been learning Python for not so long so there might also be easier ways to do speaker recognition using a mic :)

need help understanding data section of wav file

烈酒焚心 提交于 2019-12-11 13:59:10
问题 I was reading THIS TUTORIAL on wav files and I have some confusions. Suppose I use PCM_16_BIT as my encoding format. So this should mean each of my sound samples need 16 bits to represent them shouldn't it? But in this tutorial, the second figure shows 4 bytes as one sample. Why is that? I suppose because it is trying to show the format for a stereo recorded wav file, but what if I have a mono recorded wav file? Are the left and right channel values equal in this case, or one of the channel

Importing audio track (wav or aiff) in Python

人盡茶涼 提交于 2019-12-11 12:56:34
问题 I have an audio track in AIFF format. I would like to open this audio file with Python, and import the amplitudes of the sound and perform some mathematical analysis such as Fourier Transform, etc. Is this possible in Python? Are there libraries or modules, which allow me to acquire an audio file? Throughout my search, I have found scipy.io.wavfile, which works for WAV audio files. Are there other libraries to import audio files in Python? Is there something similar for AIFF files? Obviously,

Converting a call center recording to something useful

牧云@^-^@ 提交于 2019-12-11 12:11:56
问题 I have a call center recording (when played it sounds gibberish) for which the mediainfo shows info as ion@aurora:~/Inbound$ mediainfo 48401-3405-48403--18042018170000.wav General Complete name : 48401-3405-48403--18042018170000.wav Format : Wave File size : 327 KiB Duration : 4mn 11s Overall bit rate : 10.7 Kbps Audio Format : G.723.1 Codec ID : A100 Duration : 4mn 11s Bit rate : 10.7 Kbps Channel(s) : 2 channels Sampling rate : 8 000 Hz Stream size : 327 KiB (100%) The ffmpeg info shows

Using .NET to detect .ogg file properties? Number of channels, bits per channel, sample rate? [closed]

痴心易碎 提交于 2019-12-11 12:03:25
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 5 years ago . Does anyone know how to detect various .ogg file properties such as the number of channels, bits per channel, and the sample rate? I would like to do this without using DirectX, can anyone recommend a library that could do it. Can anyone recommend an open-source library that could do it, which could be called

Error recording voice at16000 khz 16bit mono little endian wav file in android device [duplicate]

狂风中的少年 提交于 2019-12-11 11:51:52
问题 This question already exists : Closed 7 years ago . Possible Duplicate: how to convert or record .wav file in 16khz 16bit mono little-endian? I want to implement audio recording from an android device at 16000 khz 16bit mono little endian wav file. I had implemented the logic in android like this. I'm using one class name as extaudiorecorder. public class ExtAudioRecorder { private final static int[] sampleRates = {44100, 22050, 11025, 16000}; public static ExtAudioRecorder getInstanse

Can't encode an Audio file to Base64?

血红的双手。 提交于 2019-12-11 10:55:22
问题 Objective: Dialog Flow Voice Bot Api I need to send a wav file to the Dialog Flow Api and the format and settings were pre-defined. So I recorded an audio using AVAudioRecorder in .wav format using following settings audioFilename = getDocumentsDirectory().appendingPathComponent("input.wav") let settings: [String: Any] = [ AVFormatIDKey: Int(kAudioFormatLinearPCM), AVSampleRateKey: 16000, AVNumberOfChannelsKey: 2, AVLinearPCMBitDepthKey: 16, AVLinearPCMIsBigEndianKey: false,

Ogg to Riff/Wave encoding with acm

好久不见. 提交于 2019-12-11 09:22:49
问题 My task is to record wave file, convert it to ogg and pack it to the riff container. First two parts were done, but I have problems with the third part. I've found a source code which can solve my problem, but it doesn't work correctly. #include <windows.h> #include <windowsx.h> #include <mmsystem.h> #include <memory.h> #include <stdlib.h> #include <mmreg.h> #include <msacm.h> #include <assert.h> #include <math.h> #include <time.h> #include <sys/types.h> #include <sys/stat.h> #define INPUT