wav

Web Audio API - Live Stream 'clicks' between chunks.

痞子三分冷 提交于 2019-12-12 03:02:10
问题 I am trying to stream audio through a websocket on a node.js (express) server to a web browser. The audio is coming from an iOS device as 16-bit, mono wav files sampled at 4k (4000 samples per second). Here's my code: Server Code: webSocketServer.on('connection', function connection(client) { client.on('message', function(message) { webSocketServer.clients.forEach(function each(connection) { connection.send(message, { binary: true } ); }); }); Client Code: webSocket = new WebSocket('ws://' +

WAV file only playing on certain computers in ie 8

浪尽此生 提交于 2019-12-12 02:59:59
问题 I have a simple HTML file with Javascript calling a function to play a wav file. It's very basic and works just fine on one of my computers. I press a key on the keyboard and the wav file plays just fine. I run the same file on a different computer and I get a javascript error that says: "Unspecified error." It seems to act like the file I'm trying to play doesn't exist. I haven't attached my code becuase it works flawlessly on the other computer so I'm thinking maybe this is just a internet

Using NAudio to achieve fade out and fade in for a series of 44 kHz 16-bit two-channel wave files

不想你离开。 提交于 2019-12-12 02:28:11
问题 I have a series of 44 kHz 16-bit two-channel uncompressed wave files (read from resources) and want to apply the fade out and fade in effect to create a stream from the sequence of all the WAV files. The resource reading, and getting the 16-bit wavestream happens correctly. The target format is also shown correct, but I keep getting acmnotpossible as the exception in the waveformat coversion step below. What am I doing wrong? String ResToPlay2 = NameSpaceString + ".Resources." + inWave2 + "

Passing a URL to a specific piece of example code which extracts samples from a WAV file

空扰寡人 提交于 2019-12-12 02:09:50
问题 I don't know if it is legal on SOF to access such a specific question, but here I go: I've found this wonderful piece of code which takes all the samples from a WAV file and passes it into an array. The code compiles, but I can't seem to figure out where to pass the argument of where the file is and what its name is. Any help? PS If this code does what it says it does, I think it could be useful to a lot of people. Thanks! 回答1: If you look at the code it's reading from stdin (and it even says

How do i convert wav file to mp3 file if i have url of file using php?

佐手、 提交于 2019-12-12 01:29:33
问题 I have a url of the wav file http://xyz.com/recordings/employees/test.wav What i want to know is how can i change this file into mp3 format and store it in a particular location using php script because this file is located in some other server? I know about ffmpeg but not sure whether it will work or not. 回答1: I hope you have linux: exec('wget http://xyz.com/recordings/employees/test.wav'); exec('ffmpeg -i test.wav test.mp3'); exec('mv test.mp3 /youlocation/test.mp3'); 回答2: Thats usually no

How to find and plot the largest sample in a wav file

一个人想着一个人 提交于 2019-12-11 23:33:17
问题 I wrote this code where I read a wav file and then It identifies where is the larger sample, but this only give me the possition of the max sample, but not the value of it, so what can I do to know which is its value? And when I plot it, why it doesn't fit on thw y-scale. For example, it says that the value is 6920, but when I plot, it only reaches 5535. Thank you! import matplotlib.pyplot as plt import numpy as np import wave import sys spf1 = wave.open('C:/Users/Martinez/Documents/Diego

Find value of frequency form Sin wav

僤鯓⒐⒋嵵緔 提交于 2019-12-11 22:17:33
问题 i have a this following equation of sine wav Fs = 8000; % Sampling rate of signal Fc = 3000; % Carrier frequency t = [0:Fs-1]'/Fs; % Sampling times dev = 50; % Frequency deviation in modulated signal s1 = sin(2*pi*200*t)+2*sin(2*pi*f*t); now i want to value of f for s1 equation how can we get this? thanks 回答1: You may want to look around SO for similar questions. The FFT is the simplest route to a solution: spec = abs(fft(s1)); Then search for the maxima in the spectrum using a detection

fread fwrite fseek in C

北城余情 提交于 2019-12-11 18:59:45
问题 Hello what i am trying to do is to reverse a binary file. The type of the file is wav so for example if the channel number is 2 and bits per sample are 16 each time i will copy 32/8 = 4 bytes. The first think to do is copy the header as it is(that part is ok) and then reverse he data. I've created a code to copy the header and then part of the data from the end this 10 times(for testing) but instead of copying 40 bytes it stops at 20 for some reason(even if it would do it 20 times it would

How to create a datagrid with wav-files in WPF

半腔热情 提交于 2019-12-11 17:36:28
问题 I hope somebody could help me. I want to add a wav-file for every object in my objectlist. The class is bound to an ObservableCollection. But I want to know the easiest way to read and play these wav-files from a datagrid using SoundPlayer? public string CoName { get { return coName; } set { coName = value; Changed("CoName"); } } public byte[] CoSound { get { return coSound; } set { coSound = value; Changed("CoSound"); } } 回答1: You could use MediaElement. You should bind the Source property

What are the 13 MFCC features

我的未来我决定 提交于 2019-12-11 17:23:36
问题 I saw many places that uses 13 MFCC features to analyse wav files. I couldn't find any exploitation to what is the meaning of each feature? e.g what is the first MFCC feature, the second , etc. In particular, I couldn't find how to get the pitch (F0) from the MFCC features? Thanks 来源: https://stackoverflow.com/questions/54530052/what-are-the-13-mfcc-features