wav

Play WAV audio file in Edge with Angular/Javascript

拥有回忆 提交于 2020-03-05 00:33:13
问题 I have following code in Angular to playback a uploaded WAV file: <input #fileImportInput (change)="fileChangeListener($event)" /> <audio #myAudio controls controlsList="nodownload"> <source src="" /> </audio> audioElement: HTMLAudioElement; @ViewChild('myAudio', { static: true }) myAudio: any; ngOnInit() { this.audioElement = this.myAudio.nativeElement; } fileChangeListener(files: any): void { const inputFile = files.target.files[0]; if (window.URL && window.URL.createObjectURL) { this

Creating suitable WAV files for Google Speech API

让人想犯罪 __ 提交于 2020-02-23 09:15:11
问题 I'm using pyaudio to record my voice as wav file. I'm using following code: def voice_recorder(): FORMAT = pyaudio.paInt16 CHANNELS = 2 RATE = 22050 CHUNK = 1024 RECORD_SECONDS = 4 WAVE_OUTPUT_FILENAME = "first.wav" audio = pyaudio.PyAudio() # start Recording stream = audio.open(format=FORMAT, channels=CHANNELS, rate=RATE, input=True, frames_per_buffer=CHUNK) print "konusun..." frames = [] for i in range(0, int(RATE / CHUNK * RECORD_SECONDS)): data = stream.read(CHUNK) frames.append(data)

Creating suitable WAV files for Google Speech API

爷,独闯天下 提交于 2020-02-23 09:15:09
问题 I'm using pyaudio to record my voice as wav file. I'm using following code: def voice_recorder(): FORMAT = pyaudio.paInt16 CHANNELS = 2 RATE = 22050 CHUNK = 1024 RECORD_SECONDS = 4 WAVE_OUTPUT_FILENAME = "first.wav" audio = pyaudio.PyAudio() # start Recording stream = audio.open(format=FORMAT, channels=CHANNELS, rate=RATE, input=True, frames_per_buffer=CHUNK) print "konusun..." frames = [] for i in range(0, int(RATE / CHUNK * RECORD_SECONDS)): data = stream.read(CHUNK) frames.append(data)

csv to wav python

拟墨画扇 提交于 2020-01-25 22:20:33
问题 Hi i have this code that suppose to convert csv file to wav file. it creates a wav file but we don't hear anything. If i put 10 rows in the csv file, it make an about 1 min wav file ! So it is not proportional at all. my csv looks like: 0.000785,0.30886552 0.00157,0.587527526 0.002355,0.808736061 0.00314,0.950859461 0.003925,0.999999683 0.00471,0.951351376 0.005495,0.809671788 0.00628,0.588815562 0.007065,0.31037991 0.00785,0.001592653 0.008635,-0.307350347 0.00942,-0.586237999 0.010205,-0

Play wav file python 3

二次信任 提交于 2020-01-25 18:40:09
问题 I want to play a .wav file in Python 3.4. Additonally, I want python to play the file rather than python open the file to play in VLC, media player etc.. As a follow up question, is there any way for me to combine the .wav file and the .py file into a standalone exe. Ignore the second part of the question if it is stupid, I don't really know anything about compiling python. Also, I know there have been other questions about .wav files, but I have not found one that works in python 3.4 in the

How to properly write a fade-out to a WAV file using NAudio?

生来就可爱ヽ(ⅴ<●) 提交于 2020-01-24 15:23:46
问题 I'm using NAudio to convert & trim some audio files, and I'm trying to add a fade-out to the last few seconds of each file. I have checked this question, this, and this, but all the answers are talking about playing the wav file with fade, while I need to actually write that fade to an output file. So, is there any way to do this using NAudio? If not, I'm open to other suggestions. Edit: This is what I've tried: private void PerformFadeOut(string inputPath, string outputPath) { WaveFileReader

How to properly write a fade-out to a WAV file using NAudio?

*爱你&永不变心* 提交于 2020-01-24 15:22:25
问题 I'm using NAudio to convert & trim some audio files, and I'm trying to add a fade-out to the last few seconds of each file. I have checked this question, this, and this, but all the answers are talking about playing the wav file with fade, while I need to actually write that fade to an output file. So, is there any way to do this using NAudio? If not, I'm open to other suggestions. Edit: This is what I've tried: private void PerformFadeOut(string inputPath, string outputPath) { WaveFileReader

How to write FLAC files in java

折月煮酒 提交于 2020-01-22 12:45:05
问题 I have a requirement to write FLAC files in java. Earlier I was writing the audio input into a WAV file and then converting it to FLAC file using a external converter I was looking into JFlac to find any API through which I can write FLAC files. I found that AudioFileFormat.TYPE in java supports only the following file formats - AIFC, AIFF, SND, AU, WAVE . I would like to have a method where I can capture the audio from the microphone and, using an API such as Audiosystem.write, write it to a

In Java, How do you stop a previous audio file when another audio file starts using key_events

老子叫甜甜 提交于 2020-01-21 21:53:30
问题 I know about the clip.stop() method, however it doesn't seem to work within when I have it inside the key_events. It just causes an Error. Well I know why it causes the error. Because I'm asking it to essentially stop a clip that doesn't exist until a few lines later. But using this same logic or close to it if possible, how could I recode that so it knows to select the previous clip that was playing from a previous key_event. The functionality I'm intending for is: When F1 is pressed, a wav

In Java, How do you stop a previous audio file when another audio file starts using key_events

半世苍凉 提交于 2020-01-21 21:53:02
问题 I know about the clip.stop() method, however it doesn't seem to work within when I have it inside the key_events. It just causes an Error. Well I know why it causes the error. Because I'm asking it to essentially stop a clip that doesn't exist until a few lines later. But using this same logic or close to it if possible, how could I recode that so it knows to select the previous clip that was playing from a previous key_event. The functionality I'm intending for is: When F1 is pressed, a wav