
Recherche avancée
Médias (91)
-
Corona Radiata
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Lights in the Sky
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Head Down
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Echoplex
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Discipline
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Letting You
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
Autres articles (59)
-
MediaSPIP v0.2
21 juin 2013, parMediaSPIP 0.2 est la première version de MediaSPIP stable.
Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
Comme pour la version précédente, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...) -
MediaSPIP version 0.1 Beta
16 avril 2011, parMediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...) -
Gestion des droits de création et d’édition des objets
8 février 2011, parPar défaut, beaucoup de fonctionnalités sont limitées aux administrateurs mais restent configurables indépendamment pour modifier leur statut minimal d’utilisation notamment : la rédaction de contenus sur le site modifiables dans la gestion des templates de formulaires ; l’ajout de notes aux articles ; l’ajout de légendes et d’annotations sur les images ;
Sur d’autres sites (3345)
-
Twilio Real-Time Media Streaming to WebSocket Receives Only Noise Instead of Speech
21 février, par dannym25I'm setting up a Twilio Voice call with real-time media streaming to a WebSocket server for speech-to-text processing using Google Cloud Speech-to-Text. The connection is established successfully, and I receive a continuous stream of audio data from Twilio. However, when I play back the received audio, all I hear is a rapid clicking/jackhammering noise instead of the actual speech spoken during the call.


Setup :


- 

- Twilio
sends inbound audio to my WebSocket server. - WebSocket receives and saves the raw mulaw-encoded audio data from Twilio.
- The audio is processed via Google Speech-to-Text for transcription.
- When I attempt to play back the audio, it sounds like machine-gun-like noise instead of spoken words.










1. Confirmed WebSocket Receives Data


• The WebSocket successfully logs incoming audio chunks from Twilio :


🔊 Received 379 bytes of audio from Twilio
🔊 Received 379 bytes of audio from Twilio



• This suggests Twilio is sending audio data, but it's not being interpreted correctly.


2. Saving and Playing Raw Audio


• I save the incoming raw mulaw (8000Hz) audio from Twilio to a file :


fs.appendFileSync('twilio-audio.raw', message);



• Then, I convert it to a
.wav
file using FFmpeg :

ffmpeg -f mulaw -ar 8000 -ac 1 -i twilio-audio.raw twilio-audio.wav



• Problem : When I play the audio using
ffplay
, it contains no speech, only rapid clicking sounds.

3. Ensured Correct Audio Encoding


• Twilio sends mulaw 8000Hz mono format.
• Verified that my
ffmpeg
conversion is using the same settings.
• Tried different conversion methods :

ffmpeg -f mulaw -ar 8000 -ac 1 -i twilio-audio.raw -c:a pcm_s16le twilio-audio-fixed.wav



→ Same issue.


4. Checked Google Speech-to-Text Input Format


• Google STT requires proper encoding configuration :


const request = {
 config: {
 encoding: 'MULAW',
 sampleRateHertz: 8000,
 languageCode: 'en-US',
 },
 interimResults: false,
};



• No errors from Google STT, but it never detects speech, likely because the input audio is just noise.


5. Confirmed That Raw Audio is Not a WAV File


• Since Twilio sends raw audio, I checked whether I needed to strip the header before processing.
• Tried manually extracting raw bytes, but the issue persists.


Current Theory :


- 

- The WebSocket server might be handling Twilio’s raw audio incorrectly before saving it.
- There might be an additional header in the Twilio stream that needs to be removed before playback.
- Twilio’s
<stream></stream>
tag expects a WebSocket connection starting withwss://
instead ofhttps://
, and switching towss://
partially fixed some previous connection issues.








Code Snippets :


Twilio
Setup in TwiML Response 

app.post('/voice-response', (req, res) => {
 console.log("📞 Incoming call from Twilio");

 const twiml = new twilio.twiml.VoiceResponse();
 twiml.say("Hello! Welcome to the service. How can I help you?");
 
 // Prevent Twilio from hanging up too early
 twiml.pause({ length: 5 });

 twiml.connect().stream({
 url: `wss://your-ngrok-url/ws`,
 track: "inbound_track"
 });

 console.log("🛠️ Twilio Stream URL:", `wss://your-ngrok-url/ws`);
 
 res.type('text/xml').send(twiml.toString());
});



WebSocket Server Handling Twilio Audio Stream


wss.on('connection', (ws) => {
 console.log("🔗 WebSocket Connected! Waiting for audio input...");

 ws.on('message', (message) => {
 console.log(`🔊 Received ${message.length} bytes of audio from Twilio`);

 // Save raw audio data for debugging
 fs.appendFileSync('twilio-audio.raw', message);

 // Check if audio is non-empty but contains only noise
 if (message.length < 100) {
 console.warn("⚠️ Warning: Audio data from Twilio is very small. Might be silent.");
 }
 });

 ws.on('close', () => {
 console.log("❌ WebSocket Disconnected!");
 
 // Convert Twilio audio for debugging
 exec(`ffmpeg -f mulaw -ar 8000 -ac 1 -i twilio-audio.raw twilio-audio.wav`, (err) => {
 if (err) console.error("❌ FFmpeg Conversion Error:", err);
 else console.log("✅ Twilio Audio Saved as `twilio-audio.wav`");
 });
 });

 ws.on('error', (error) => console.error("⚠️ WebSocket Error:", error));
});



Questions :


- 

- Why is the audio from Twilio being received as a clicking noise instead of actual speech ?
- Do I need to strip any additional metadata from the raw bytes before saving ?
- Is there a known issue with Twilio’s
mulaw
format when streaming audio over WebSockets ? - How can I confirm that Google STT is receiving properly formatted audio ?










Additional Context :


- 

- Twilio
<stream></stream>
is connected and receiving data (confirmed by logs). - WebSocket successfully receives and saves audio, but it only plays noise.
- Tried multiple ffmpeg conversions, Google STT configurations, and raw data inspection.
- Still no recognizable speech in the audio output.










Any help is greatly appreciated ! 🙏


- Twilio
-
Android Media palyer by FFmpeg2.3.3 and SDL2-2.0.3 has a error when SDL_init().The error is about SDL_main.h
18 novembre 2014, par HanamakiI use FFmpeg2.3.3 and SDL2-2.0.3 to develop an Android video player.I built the .apk success,but when I ran it,it’s an error at SDL_init().I got message by SDL_error().The message was :
SDL_Init(14144) : Application didn’t initialize properly, did you include SDL_main.h in the file containing your main() function ?
but I have #include "SDL_main.h" in the source.Anyone has some suggestions ? thanks very much.
-
List of file and the file size using cmd or media info/ffmpeg [duplicate]
22 juillet 2021, par firekid2018We can use to get the file name
dir /b>list.txt
using windows CMD. is there anyway we can get the file size info with name using cmd/mediainfo/ffmpeg or other app ? CMD can generate the file size but it's in "bytes" formate. i am looking for KB/MB/GB format.

logo.png 32KB
Header.png 160kb