
Advanced search
Other articles (46)
-
Installation en mode ferme
4 February 2011, byLe mode ferme permet d’héberger plusieurs sites de type MediaSPIP en n’installant qu’une seule fois son noyau fonctionnel.
C’est la méthode que nous utilisons sur cette même plateforme.
L’utilisation en mode ferme nécessite de connaïtre un peu le mécanisme de SPIP contrairement à la version standalone qui ne nécessite pas réellement de connaissances spécifique puisque l’espace privé habituel de SPIP n’est plus utilisé.
Dans un premier temps, vous devez avoir installé les mêmes fichiers que l’installation (...) -
Multilang : améliorer l’interface pour les blocs multilingues
18 February 2011, byMultilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela. -
MediaSPIP v0.2
21 June 2013, byMediaSPIP 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 (...)
On other websites (5446)
-
Pydub FFMPEG issue [closed]
14 January, by Nikolai van den HovenI am attempting to use FFMPEG with Pydub to create a program that chops .mp3 files into different words, each contained in their own .mp3 file, but when I run the script I am getting the following error:


PS C:\Users\nik> & C:/Users/nik/AppData/Local/Microsoft/WindowsApps/python3.12.exe "d:/Python/Word Splitter.py"
C:\Users\nik\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\pydub\utils.py:170: RuntimeWarning: Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work
 warn("Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work", RuntimeWarning)



This is the code I am using.


import os
from pydub import AudioSegment
from pydub.silence import split_on_silence
import speech_recognition as sr
AudioSegment.ffmpeg = r"D:\Python\ffmpeg\bin\ffmpeg.exe"
def mp3_to_words(mp3_file, output_folder):
 # Ensure output folder exists
 os.makedirs(output_folder, exist_ok=True)

 # Load MP3 file
 print("Loading audio file...")
 audio = AudioSegment.from_mp3(mp3_file)

 # Split audio into chunks using silence detection
 print("Splitting audio into chunks...")
 chunks = split_on_silence(
 audio,
 min_silence_len=200, # Minimum silence duration in ms to consider as a split point
 silence_thresh=audio.dBFS - 14, # Silence threshold relative to average loudness
 keep_silence=100 # Retain some silence in chunks
 )

 recognizer = sr.Recognizer()

 for i, chunk in enumerate(chunks):
 print(f"Processing chunk {i + 1}/{len(chunks)}...")

 # Save the chunk temporarily
 temp_file = os.path.join(output_folder, f"chunk_{i}.wav")
 chunk.export(temp_file, format="wav")

 # Recognize words in the chunk
 with sr.AudioFile(temp_file) as source:
 audio_data = recognizer.record(source)
 try:
 text = recognizer.recognize_google(audio_data)
 words = text.split()

 # Export each word as its own MP3
 word_start = 0
 for j, word in enumerate(words):
 word_duration = len(chunk) // len(words) # Approximate duration per word
 word_audio = chunk[word_start:word_start + word_duration]
 word_file = os.path.join(output_folder, f"word_{i}_{j}.mp3")
 word_audio.export(word_file, format="mp3")
 word_start += word_duration

 except sr.UnknownValueError:
 print(f"Could not understand chunk {i + 1}.")
 except sr.RequestError as e:
 print(f"Could not request results; {e}")

 # Clean up temporary file
 os.remove(temp_file)

 print(f"Processed {len(chunks)} chunks. Word MP3s saved in {output_folder}.")

if __name__ == "__main__":
 input_file = input("Enter the path to the MP3 file: ").strip()
 output_dir = input("Enter the output folder path: ").strip()

 mp3_to_words(input_file, output_dir)



I have added the Base FFMPEG folder and the bin folder within it to Windows PATH
My PATH variable on Windows 11,
But it does not show up in the variable when I typed PATH into cmd


-
avcodec/vc1_block: Fix mqaunt check for negative values
28 June 2018, by Michael Niedermayeravcodec/vc1_block: Fix mqaunt check for negative values
Fixes: out of array access
Fixes: ffmpeg_bof_4.avi
Fixes: ffmpeg_bof_5.avi
Fixes: ffmpeg_bof_6.aviFound-by: Thuan Pham, Marcel Böhme, Andrew Santosa and Alexandru Razvan Caciulescu with AFLSmart
Reviewed-by: Jerome Borsboom <jerome.borsboom@carpalis.nl>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> -
avfilter/vf_idet: MMX/MMXEXT/SSE2 implementation of idet’s filter_line()
3 September 2014, by skalavfilter/vf_idet: MMX/MMXEXT/SSE2 implementation of idet’s filter_line()
integration by Neil Birkbeck, with help from Vitor Sessak.
core SSE2 loop by Skal (pascal.massimino@gmail.com)Reviewed-by: Clément Bœsch <u@pkh.me>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>