
Recherche avancée
Médias (1)
-
Bug de détection d’ogg
22 mars 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Video
Autres articles (55)
-
Les autorisations surchargées par les plugins
27 avril 2010, parMediaspip core
autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs -
Publier sur MédiaSpip
13 juin 2013Puis-je poster des contenus à partir d’une tablette Ipad ?
Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir -
Keeping control of your media in your hands
13 avril 2011, parThe vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...)
Sur d’autres sites (9411)
-
Passing stream of getUserMedia output to ffmpeg,How would i do that ?
29 décembre 2016, par A SahraI am using getUserMedia to get access to camera.while playing the captured video with getUserMedia i want to stream and broadcast it to all user in my page as Live stream using ffmpeg and ffserver,
How would i post that stream to server(ffserver) for streaming it Live ?
Here is the code for getUserMedia part
window.addEventListener('DOMContentLoaded', function() {
var v = document.getElementById('vlive');
navigator.getUserMedia = (navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia || navigator.msGetUserMedia);
if (navigator.getUserMedia)
{
navigator.getUserMedia( { video:true, audio:true, },
function(stream) {
var url = window.URL || window.webkitURL;
v.src = url ? url.createObjectURL(stream) : stream;
v.play();
},
function(error) { console.log('Good Job');
alert('Something went wrong. (error code ' + error.code + ')');
return;
});
}
else {
alert('Sorry, the browser you are using doesn\'t support getUserMedia');
return;
} }); -
Passing stream of getUserMedia output to ffmpeg,How would i do that ?
1er octobre 2018, par A SahraI am using getUserMedia to get access to camera.while playing the captured video with getUserMedia. I want to stream and broadcast it to all user in my page as Live stream using ffmpeg and ffserver.
How would I post that stream to server(ffserver) for streaming it live ?
Here is the code for getUserMedia part
window.addEventListener('DOMContentLoaded', function() {
var v = document.getElementById('vlive');
navigator.getUserMedia = (navigator.getUserMedia || navigator.webkitGetUserMedia
|| navigator.mozGetUserMedia || navigator.msGetUserMedia);
if (navigator.getUserMedia) {
navigator.getUserMedia({
video: true,
audio: true,
},
function(stream) {
var url = window.URL || window.webkitURL;
v.src = url ? url.createObjectURL(stream) : stream;
v.play();
},
function(error) {
console.log('Good Job');
alert('Something went wrong. (error code ' + error.code + ')');
return;
});
} else {
alert('Sorry, the browser you are using doesn\'t support getUserMedia');
return;
}
}); -
getting a `InValid URL` when I send a voice message
9 septembre 2023, par AmmadWhen I try to send voice messages I always get invalid url error with. I am using whisper to convert the audio to text but for some reason I cannot seem to pass the file to the whisper. It worked when I used this in java script but not in typescript for some reason


async function createFile(path: string): Promise<file> {
 const response = await fetch(path);
 const data = await response.blob();
 
 // Extract file name from the path
 const fileName = path.split('/').pop() || 'unknown';
 
 // Extract file extension and determine MIME type
 const fileExtension = fileName.split('.').pop()?.toLowerCase() || '';
 const mimeTypes: Record = {
 'mp3': 'audio/mpeg',
 // Add more mappings as needed
 };
 const fileType = mimeTypes[fileExtension] || 'application/octet-stream';
 
 const metadata = {
 type: fileType
 };
 
 return new File([data], fileName, metadata);
}

async function sendAudioForTranscription(file_path:string) {
 try {
 
 // const audioData = fs.createReadStream(file_path);
 const audioFile = await createFile(file_path)

 const response = await openai.createTranscription(audioFile, "whisper-1");
 const transcribed = response.data.text;

 return transcribed;
 } catch (error) {
 console.error("Error transcribing the audio:", error);
 return null;
 }
}
</file>


I am new to this so any help would be appreciated. This is the error


Error transcribing the audio: TypeError: Failed to parse URL from src\audio_files\false_xxxxxxxxx8@c.us_B161BC6FA04DB01B8B31F5E0F83EDAD5.mp3
 at Object.fetch (node:internal/deps/undici/undici:11576:11)
 at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
 [cause]: TypeError [ERR_INVALID_URL]: Invalid URL
 at new NodeError (node:internal/errors:405:5)
 at new URL (node:internal/url:778:13)
 at new Request (node:internal/deps/undici/undici:7132:25)
 at fetch2 (node:internal/deps/undici/undici:10715:25)
 at Object.fetch (node:internal/deps/undici/undici:11574:18)
 at fetch (node:internal/process/pre_execution:270:25)
 at C:\Users\Ammad Ali\Documents\Documents\alex-whatsapp-bot\build\openai\transcript.js:28:32
 at C:\Users\Ammad Ali\Documents\Documents\alex-whatsapp-bot\build\openai\transcript.js:8:71
 at new Promise (<anonymous>)
 at __awaiter (C:\Users\Ammad Ali\Documents\Documents\alex-whatsapp-bot\build\openai\transcript.js:4:12)
 at createFile (C:\Users\Ammad Ali\Documents\Documents\alex-whatsapp-bot\build\openai\transcript.js:27:12)
 at Object.<anonymous> (C:\Users\Ammad Ali\Documents\Documents\alex-whatsapp-bot\build\openai\transcript.js:49:37)
 at Generator.next (<anonymous>)
 at C:\Users\Ammad Ali\Documents\Documents\alex-whatsapp-bot\build\openai\transcript.js:8:71
 at new Promise (<anonymous>) {
 input: 'src\\audio_files\\false_xxxxxxxxx8@c.us_B161BC6FA04DB01B8B31F5E0F83EDAD5.mp3',
 code: 'ERR_INVALID_URL'
 }
}
</anonymous></anonymous></anonymous></anonymous>


To get a response back in voice message