audio

Using FFMPEG on Google Cloud Platform

£可爱£侵袭症+ 提交于 2020-05-27 06:59:05
问题 I'm storing audio files on Google Cloud Storage (through Firebase storage). I need to use FFMPEG to convert the audio file from stereo (two channels) to mono (one channel). How can I perform the above conversion on Google Cloud Platform? Update: I suspect one possibility is to use Google Compute Engine to create a virtual machine, install ffmpeg, and somehow gain access to the audio files. I'm not sure if this is the best way or even possible. So I'm still investigating. 回答1: If you have code

Check if selected microphone is muted or not with web audio api

时光总嘲笑我的痴心妄想 提交于 2020-05-27 04:02:34
问题 By using the following, we can prompt the user to select their preferred media input device with audio and video source constraints (currently only interested in Chrome support). navigator.mediaDevices.getUserMedia({audio: true}) .then((stream) => { console.log(stream); }); Anyone know if there is an exposed API to detect if the user-selected input device is currently muted or not? The input device would be either an onboard microphone, external mic, or software defined microphone that shows

Reducing sample bit-depth by truncating

…衆ロ難τιáo~ 提交于 2020-05-26 09:59:10
问题 I have to reduce the bit-depth of a digital audio signal from 24 to 16 bit. Taking only the 16 most significant bits (i.e. truncating) of each sample is equivalent to doing a proportional calculation (out = in * 0xFFFF / 0xFFFFFF)? 回答1: I assume you mean (in * 0xFFFF) / 0xFFFFFF , in which case, yes. 回答2: You'll get better sounding results by adding a carefully crafted noise signal to the original signal, just below the truncating threshold, before truncating (a.k.a. dithering). 回答3: x *

How can I request user permission for audio on Chrome?

烈酒焚心 提交于 2020-05-25 08:10:11
问题 I am working on SAAS solution and I need customers to receive notification sounds from the application. Even if they just launched it without any interaction with it. Google has changed Chrome behaviour regarding this aspect and now user is required to click on webpage to get notification sounds. I have found out that it is possible to allow sounds explicitly here: and then user should enable sounds explicitly for your websites: Now user will not have to click to enable sound notifications.

How to change the volume of a PCM data stream (failed experiment)

前提是你 提交于 2020-05-25 04:31:24
问题 Solved My code was never before used for processing signed values and as such bytes -> short conversion was incorrectly handling the sign bit. Doing that properly solved the issue. The question was... I'm trying to change the volume of a PCM data stream. I can extract single channel data from a stereo file, do various silly experimental effects with the samples by skipping/duplicating them/inserting zeros/etc but I can't seem to find a way to modify actual sample values in any way and get a

Python change pitch of wav file [closed]

孤街醉人 提交于 2020-05-25 04:17:39
问题 Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 2 years ago . I need any python library to change pitch of my wav file without any raw audio data processing. I spent couple hours to find it, but only found some strange raw data processing code snippets and video, that shows real-time pitch shift, but without source code. 回答1: Since a wav file

Convert mp4 sound to text in python

▼魔方 西西 提交于 2020-05-24 20:09:45
问题 I want to convert a sound recording from Facebook Messenger to text. Here is an example of an .mp4 file send using Facebook's API: https://cdn.fbsbx.com/v/t59.3654-21/15720510_10211855778255994_5430581267814940672_n.mp4/audioclip-1484407992000-3392.mp4?oh=a78286aa96c9dea29e5d07854194801c&oe=587C3833 So this file includes only audio (not video) and I want to convert it to text. Moreover, I want to do it as fast as possible since I'll use the generated text in an almost real-time application (i

Don't you think this might be a flawlles solution to Check if Audio() is playing?

人盡茶涼 提交于 2020-05-17 07:28:13
问题 Do you think this might be a flawlles solution to Check if Audio() is playing? Like when handling a stratup theme ... Place this above in the head songStarted = false; song = new Audio(); song.src = 'audio/startuptheme.mp3'; song.addEventListener('playing', (event) => {songStarted = true;}); song.play(); And use the following script anywhere (where first user interaction should happen), as many times as you need if (!songStarted){ if (typeof song == 'undefined'){ song = new Audio(); song.src

How to rapidly play multiple copies of a soundfile in javascript

人走茶凉 提交于 2020-05-17 06:36:32
问题 I'm building a wheel of fortune in html+js that spins rather quickly. Every time a new color flies by the mark, the wheel should play a click-sound. At top speed this sounds almost like a machine gun, so a new file starts playing before the old one is finished basically. The file itself is always the same: click.wav It works fine in Chrome, only in chrome. Firefox has a weird bug, where it only plays the sound, if there is any other audio source active, such as a youtube video playing in a

How to apply Praat script to an audio file?

怎甘沉沦 提交于 2020-05-17 06:33:06
问题 I'm trying to change formants of the audio file with praat in Colab. I found the script that does that, it's code and the code for calculating formants. I installed praat : !sudo apt-get update -y -qqq --fix-missing && apt-get install -y -qqq praat > /dev/null !wget -qqq http://www.praatvocaltoolkit.com/downloads/plugin_VocalToolkit.zip !unzip -qqq /content/plugin_VocalToolkit.zip > /dev/null with open('/content/script.praat', 'w') as f: f.write(r"""writeInfoLine: preferencesDirectory$""")