audio

iOS - Streaming and receiving audio from a device to another ends in one only sending and the other only receiving

耗尽温柔 提交于 2021-02-20 03:44:18
问题 My app is basically a phone call over MultipeerConnectivity. Here is how I'm setting up the audio session: Note that recordingSession is of type AVAudioSession and captureSession is of type AVCaptureSession. func setupAVRecorder() { print("\(#file) > \(#function) > Entry") do { try recordingSession.setCategory(AVAudioSessionCategoryPlayAndRecord) try recordingSession.setMode(AVAudioSessionModeVoiceChat) try recordingSession.setPreferredSampleRate(44100.00) try recordingSession

How to fix UnsatisfiedLinkError?

拟墨画扇 提交于 2021-02-20 00:23:10
问题 I wish to use one of my local sound files to provide background music, but I get this error message: Caused by: java.lang.UnsatisfiedLinkError: Can't load library: C:\Program Files\Amazon Corretto\jdk1.8.0_232\jre\bin\glib-lite.dll But my code is as follow: public class DungeonGUI extends Application { private Dungeon dungeon; private Stage stage; private GridPane root; private Button attack; private Button heal; // private Button checkInventory; private Button save; private Text

How to fix UnsatisfiedLinkError?

余生长醉 提交于 2021-02-20 00:13:22
问题 I wish to use one of my local sound files to provide background music, but I get this error message: Caused by: java.lang.UnsatisfiedLinkError: Can't load library: C:\Program Files\Amazon Corretto\jdk1.8.0_232\jre\bin\glib-lite.dll But my code is as follow: public class DungeonGUI extends Application { private Dungeon dungeon; private Stage stage; private GridPane root; private Button attack; private Button heal; // private Button checkInventory; private Button save; private Text

How can we use microphone in google colab?

北城余情 提交于 2021-02-19 08:41:28
问题 OSError Traceback (most recent call last) <ipython-input-21-4159a88154c9> in <module>() 7 response = google_images_download.googleimagesdownload() 8 r = sr.Recognizer() ----> 9 with sr.Microphone() as source: 10 print("Say something!") 11 audio = r.listen(source) /usr/local/lib/python3.6/dist-packages/speech_recognition/ init .py in init (self, device_index, sample_rate, chunk_size) 84 assert 0 <= device_index < count, "Device index out of range ({} devices available; device index should be

Mixing Audio Files in Java

做~自己de王妃 提交于 2021-02-19 07:52:12
问题 I am creating this program in Java that import X number of Audio files and mix them in 1 audio file. Example: Import: "Audio1.wav", "Audio2.wav". Mix them. Export: "Result.wav" Until now i have the import and export methods, my problem is mixing the files into 1 file. Edit: Some pice of code. private static File openDialog(){ JFileChooser open = new JFileChooser(); int returnVal = open.showOpenDialog(open); if (returnVal == JFileChooser.APPROVE_OPTION){ return open.getSelectedFile(); } return

Mixing Audio Files in Java

拜拜、爱过 提交于 2021-02-19 07:52:03
问题 I am creating this program in Java that import X number of Audio files and mix them in 1 audio file. Example: Import: "Audio1.wav", "Audio2.wav". Mix them. Export: "Result.wav" Until now i have the import and export methods, my problem is mixing the files into 1 file. Edit: Some pice of code. private static File openDialog(){ JFileChooser open = new JFileChooser(); int returnVal = open.showOpenDialog(open); if (returnVal == JFileChooser.APPROVE_OPTION){ return open.getSelectedFile(); } return

How can I get the same bitrate of input and output file in pydub?

烂漫一生 提交于 2021-02-19 06:47:46
问题 I've use pydub to output a file(chop the file into shorter one), everything is great, but the bitrate has changed from 256k to 124k(why I will get this number instead 128k?). I know that AudioSegment has an argument to set bitrate, but I just want the same bitrate instead manually set every time. Any way to fix this issue? 回答1: This has mainly to do with ffmpeg/avlib, but you can pass a flag to the AudioSegment().export() method to specify the bitrate you'd like: from pydub import

Covert video file to audio file in Xamarin Forms

纵然是瞬间 提交于 2021-02-19 06:00:50
问题 I am trying to create an app that allows a user to download the audio of youtube videos in Xamarin.Forms. I can download the video using 'VideoLibrary' and convert it to an mp3 using 'MediaToolkit' in a C# Console Application without any errors. static void DownloadAudio(string videoUrl, string saveDir) { YouTube youtube = YouTube.Default; Video vid = youtube.GetVideo(videoUrl); File.WriteAllBytes(saveDir + vid.FullName, vid.GetBytes()); string originalFile = saveDir + vid.FullName; var

Detecting a specific pattern from a FFT in Arduino

北战南征 提交于 2021-02-19 05:55:07
问题 I have an FFT output from a microphone and I want to detect a specific animal's howl from that (it howls in a characteristic frequency spectrum). Is there any way to implement a pattern recognition algorithm in Arduino to do that? I already have the FFT part of it working with 128 samples @2kHz sampling rate. 回答1: lookup audio fingerprinting ... essentially you probe the frequency domain output from the FFT call and take a snapshot of the range of frequencies together with the magnitude of

Reducing WAV sound file size, without losing quality

*爱你&永不变心* 提交于 2021-02-19 05:32:59
问题 My application needs to play sound files. The only cross-platform file format I can use is WAVE (I'm using QSound of the Qt framework). The file sizes of these sounds are quite large and I'd like to know if there is a way to reduce it, without losing (too much) quality. I need the file to be stereo. 回答1: You can zip them (using zlib or similar), then uncompress them on demand. If you've got many minutes of continuous wav it may be worth looking into audio-specific lossless compression