
Recherche avancée
Autres articles (5)
-
Que fait exactement ce script ?
18 janvier 2011, parCe script est écrit en bash. Il est donc facilement utilisable sur n’importe quel serveur.
Il n’est compatible qu’avec une liste de distributions précises (voir Liste des distributions compatibles).
Installation de dépendances de MediaSPIP
Son rôle principal est d’installer l’ensemble des dépendances logicielles nécessaires coté serveur à savoir :
Les outils de base pour pouvoir installer le reste des dépendances Les outils de développements : build-essential (via APT depuis les dépôts officiels) ; (...) -
Script d’installation automatique de MediaSPIP
25 avril 2011, parAfin de palier aux difficultés d’installation dues principalement aux dépendances logicielles coté serveur, un script d’installation "tout en un" en bash a été créé afin de faciliter cette étape sur un serveur doté d’une distribution Linux compatible.
Vous devez bénéficier d’un accès SSH à votre serveur et d’un compte "root" afin de l’utiliser, ce qui permettra d’installer les dépendances. Contactez votre hébergeur si vous ne disposez pas de cela.
La documentation de l’utilisation du script d’installation (...) -
XMP PHP
13 mai 2011, parDixit Wikipedia, XMP signifie :
Extensible Metadata Platform ou XMP est un format de métadonnées basé sur XML utilisé dans les applications PDF, de photographie et de graphisme. Il a été lancé par Adobe Systems en avril 2001 en étant intégré à la version 5.0 d’Adobe Acrobat.
Étant basé sur XML, il gère un ensemble de tags dynamiques pour l’utilisation dans le cadre du Web sémantique.
XMP permet d’enregistrer sous forme d’un document XML des informations relatives à un fichier : titre, auteur, historique (...)
Sur d’autres sites (2976)
-
ffmpeg : use drawtext with quote inside text
18 octobre 2023, par SulliI have a variable that takes its content from a file (I can't change the content of the file) :



echo $variable
It's my variable




I want to print that string on a video with ffmpeg :



ffmpeg -nostdin -i input.mp4 -vf drawtext="text='$variable': fontcolor=white:box=1:boxcolor=black@0.8: x=h/70: y=h/5*4.2" -codec:a copy output.mp4




when I do that, the quote inside $variable is not printed. I have read here that I need to escape the quote multiple times, some say 5 times, some say more.



So I have tried to use



variable=${variable//\'/'\\\\\'\'}




to add between 1 and 10 backslashes, but it never worked : either nothing is printed, or \ are printed :



It\s my variable




Can someone tell me what is the correct syntax, or the correct number of backslashes I should add ?


-
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


-
checkasm/sw_range_convert : test all supported bit depths
18 septembre 2024, par Ramiro Pollacheckasm/sw_range_convert : test all supported bit depths
This commit also reduces the number of times ff_sws_init_scale() gets
called (only once per bit depth), and the number of times randomize_buffers()
gets called (only if the function must be checked).Benchmarks are only performed on bit depths 8 and 16 (since they are
different functions, and not only different constants).