wav

Opening an audio (wav) file from a MemoryStream to determine the duration

大憨熊 提交于 2019-12-22 08:31:53
问题 Is there a way, either within the Framework or by using P/Invoke to determine the duration of a wav file that's held in a MemoryStream? I've already had a look at Managed DirectX and another similar question, but everything seems to work with paths, rather than providing any way to pass in a stream. One of the links in the question I've referenced (A simple C# Wave editor....) makes it fairly clear that I could parse the MemoryStream to determine the duration of the wav file. Ideally I'd like

How to play WAV data right from memory?

天涯浪子 提交于 2019-12-22 05:52:41
问题 I'm currently working on a sound experiment, and I've come across one issue. I save an array of wave data to a .wav file and play it, but is there a way to skip this step and simply play the sound right from memory? I'm looking for a solution that will work cross-platform. 回答1: I suppose you are using the wave library, right? The docs say: wave.open(file[, mode]) If file is a string, open the file by that name, otherwise treat it as a seekable file-like object. This means that you should be

Getting 'UnsupportedFileException' when playing wav file from URL in Java

十年热恋 提交于 2019-12-22 01:37:03
问题 I have to play a .wav file from URL but getting UnsupportedFileException . Below is the code. public class LoopSound { public static void main(String[] args) throws Exception { HostnameVerifier hv = new HostnameVerifier() { @Override public boolean verify(String urlHostName, SSLSession session) { System.out.println("Warning: URL Host: " + urlHostName + " vs. " + session.getPeerHost()); return true; } }; // Now you are telling the JRE to trust any https server. // If you know the URL that you

Convert wav to ogg on app engine (or in javascript?)

99封情书 提交于 2019-12-22 00:25:56
问题 I've built a little app engine app that lets users upload short recordings. Some of the recordings are done in-browser with https://github.com/mattdiamond/Recorderjs, which creates wav files. To save space, I'd like to convert those to ogg before writing them to the app engine datastore, so that I use less of my outgoing bandwidth when I play the audio recordings back to users. How can I do this? I googled around, and apparently there's a command line tool called oggenc that encodes to ogg --

Merge WAV audio and WebM video

你。 提交于 2019-12-21 20:35:33
问题 There's a way to merge an audio (wav) and a video (webm) in a nodejs server? Since WebM is a container format, I hope that is possible add audio track to an existing WebM file. I'm right? Anyone know a NodeJS package for doing this? 回答1: Found a solution, but is not really simple to do. For do this is required ffmpeg (or similar). To install it I done this steps: (only for mac) install HomeBrew. run the installation of ffmpeg with all the dependences that is required: sudo brew install ffmpeg

How to convert g729 encoded byte array to .WAV in C#?

杀马特。学长 韩版系。学妹 提交于 2019-12-21 13:04:09
问题 I have been working on a VoIP Application in C sharp language. The purpose of the project is VoIP Call Recording. It uses g729 Codec. I can extract the voice part from RTP payload. How to convert this Byte array to .wav format? Please help me. 回答1: You can try to use ffmpeg.exe and work with it via command line 来源: https://stackoverflow.com/questions/13468240/how-to-convert-g729-encoded-byte-array-to-wav-in-c

Play sound in react-js

本秂侑毒 提交于 2019-12-21 06:23:56
问题 I try to play a sound on react-js but I can't make it start. I have my sound var initialised in my reactClass, before get InitialState: var App = React.createClass({ audio: new Audio('files/audio.mp3'), getInitialState: function () { return { playSound: false, ........ } } And this are the functions that I have for start and stop: playSound: function() { if(!this.state.playSound){ this.setState({ playSound: true, }, function(){ console.log("play sound 1"); this.audio.play(); console.log("play

How to convert wav to flac from python?

左心房为你撑大大i 提交于 2019-12-20 21:21:30
问题 I've just started using Python and am using the PyAudio and Wave modules to take sound from my microphone and convert it to a .wav file. What I'm trying to do is now convert that .wav to a .flac . I've seen a few ways to do this which all involve installing a converter and placing it in my environmental PATH and calling it via os.system . Are there any other ways to convert a .wav to a .flac via Python? The solution I'm looking for needs to work on both Windows and Linux. 回答1: May be you're

Voice Recording/Saving in Delphi

泪湿孤枕 提交于 2019-12-20 15:29:51
问题 Is there a component or code that allows the following: Record a spoken word (or words) and save it/them to a file that can be played back. The file must be able to be played back on XP, Vista and Windows 7. The file can be either stand alone or saved to a datasource. [Using Delphi 7 for creating apps on XP and using Absolute Database.] 回答1: The functions in MMSystem.pas let you do this using Windows API. You can either use high-level functions such as the MCI functions and PlaySound, or low

WAV-file analysis C (libsndfile, fftw3)

南笙酒味 提交于 2019-12-20 09:42:52
问题 I'm trying to develop a simple C application that can give a value from 0-100 at a certain frequency range at a given timestamp in a WAV-file. Example: I have frequency range of 44.1kHz (typical MP3 file) and I want to split that range into n amount of ranges (starting from 0). I then need to get the amplitude of each range, being from 0 to 100. What I've managed so far: Using libsndfile I'm now able to read the data of a WAV-file. infile = sf_open(argv [1], SFM_READ, &sfinfo); float samples