
Recherche avancée
Médias (2)
-
Valkaama DVD Label
4 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Image
-
Podcasting Legal guide
16 mai 2011, par
Mis à jour : Mai 2011
Langue : English
Type : Texte
Autres articles (58)
-
Use, discuss, criticize
13 avril 2011, parTalk to people directly involved in MediaSPIP’s development, or to people around you who could use MediaSPIP to share, enhance or develop their creative projects.
The bigger the community, the more MediaSPIP’s potential will be explored and the faster the software will evolve.
A discussion list is available for all exchanges between users. -
L’espace de configuration de MediaSPIP
29 novembre 2010, parL’espace de configuration de MediaSPIP est réservé aux administrateurs. Un lien de menu "administrer" est généralement affiché en haut de la page [1].
Il permet de configurer finement votre site.
La navigation de cet espace de configuration est divisé en trois parties : la configuration générale du site qui permet notamment de modifier : les informations principales concernant le site (...) -
Contribute to a better visual interface
13 avril 2011MediaSPIP is based on a system of themes and templates. Templates define the placement of information on the page, and can be adapted to a wide range of uses. Themes define the overall graphic appearance of the site.
Anyone can submit a new graphic theme or template and make it available to the MediaSPIP community.
Sur d’autres sites (9302)
-
Anomalie #4128 : Bug de génération de boucle avec les modèles Spip
11 avril 2018, par Julien PORIAUSalut,
parfois le jeu de caractère "binaire" est visible uniquement dans le
code source (ligne 1233). Mais on observe tout de même un soucis dans la
mise en page.view-source:http://spip-dev.nidecker.com/probleme-de-langue.html?lang=ca
Julien.
Le 11.04.2018 à 14:28, redmine@spip.org a écrit :
La demande #4128 a été mise à jour par b b.
- Statut changé de /Nouveau/ à /En cours/
- Priorité changé de /Haut/ à /Bas/
Salut, peux-tu fournir le code du modèle en question ?
De mon côté, je n’ai aucun problème sur la page que tu cites en exemple...
Anomalie #4128 : Bug de génération de boucle avec les modèles Spip
<https://core.spip.net/issues/4128#change-13824>- Auteur : Julien PORIAU
- Statut : En cours
- Priorité : Bas
- Assigné à :
- Catégorie : code généré
- Version cible : 3.2
- Resolution :
- Navigateur : Firefox
Dans les modèles personnalisés Spip, les images (boucle documents ou
logos) sont mal générées et provoque un bug d’encodage visible dans le
front-end lors du passage dans une autre langue (balises multi).
Nous n’avons pas trouvé où était le souci dans Spip, mais les
caractères qui remontent dans le code source, ressemblent aux octets
qui composent le fichier binaire d’une image.
Voir en live ici :
http://spip-dev.nidecker.com/probleme-de-langue.html?lang=ca.Pour essayer d’isoler cette anomalie, nous avons procédé de la sorte
avec l’aide de mon développeur :1. Nous sommes reparti d’un SPIP 3.1.7 entièrement neuf (minimal),
avec deux modèles Spip, rien d’autre.
Le bug se reproduit, ce qui exclus un problème lié aux squelettes ou
autres plugins.Nous n’avons pas réussi a déterminer précisément ce qui génère ce bug,
à part que c’est dans un contexte où on appelle une langue pas définie
dans le multi.
En fonction du contenu de l’article, du nombre de modèles dans
l’article, en fonction des boucles dans les inclure, le bug n’arrive
pas au même endroit...Le problème vient de la génération des logos ou documents : si on
supprime les balises |#LOGO_*| ou si on renomme |IMG| en |IMG_|, plus
d’erreur.
Même sans traitements, avec juste |[(#LOGO_*)]|, rien à faire.2. Nous avons pensé que c’était peut être une image au mauvais format :
On a alors tenté de passer |ImageOptim| sur tout le répertoire |/IMG|,
redimensionné tous les logos en vignettes png de 320x240, rien à faire...3. On a fini par passer ce site de test en 3.2, pas mieux.
4. Nous avons épluché les caches générés dans |/tmp/cache| et
|/tmp/cache/skel|, tout paraît normal de ce côté là..5. On a ensuite un peu avancé en enlevant dans |mes_options.php| la
variable |$GLOBALS[’forcer_lang’] = true|".
Sur la version minimal, plus de bug. Mais sur le site de production,
le problème réside toujours.
Mais en faisant des tests avec et sans (et en supprimant bien
|/tmp/cache/| à chaque fois), ça se confirme pour la version minimal.6. A partir d’une copie de la version production, nous avons désactivé
tout les plugins, passer |ImageOptim| sur |/IMG| et rien a faire..
Impossible de déterminé d’où vient le problème :(7. Nous avons essayé d’écrire comme ceci : |[
src="(#LOGO_MOT|image_reduire50,*|extraire_attributsrc)" alt="">]|
Cela fonctionne sur la version minimal mais pas sur la version production.8. Dans la version minimal, j’ai encore récemment testé une dernière
chose. J’ai supprimé les documents non sollicités sur ma page de teste
(spip.php ?article1441&lang=ca).
Avec la requête SQL suivante : |DELETE FROM jones_documents WHERE
id_document NOT IN
(1948,1949,2534,2535,630,631,1783,1784,1785,1786,1787,1788,1781,1782)|
Le bug n’apparait plus..Je sèche..
Vous trouverez ici en téléchargement une archive de la version minimal
(Spip 3.1.7) :
https://www.dropbox.com/s/dek0zg7jafl8uxe/jones.zip?dl=0] ( 20mo)
Pour reproduire le bug, il suffit de passer la variable "&lang=ca"
dans l’article 1441 (localhost/spip.php ?article1441&lang=ca).Je donne volontiers un accès à la version production si besoin.
Vous recevez ce mail car vous êtes impliqués sur ce projet.
Pour changer les préférences d’envoi de mail, allez sur
http://core.spip.org/my/account---
L’absence de virus dans ce courrier électronique a été vérifiée par le logiciel antivirus Avast.
https://www.avast.com/antivirus -
Google’s YouTube Uses FFmpeg
9 février 2011, par Multimedia Mike — GeneralControversy arose last week when Google accused Microsoft of stealing search engine results for their Bing search engine. It was a pretty novel sting operation and Google did a good job of visually illustrating their side of the story on their official blog.
This reminds me of the fact that Google’s YouTube video hosting site uses FFmpeg for converting videos. Not that this is in the same league as the search engine shenanigans (it’s perfectly legit to use FFmpeg in this capacity, but to my knowledge, Google/YouTube has never confirmed FFmpeg usage), but I thought I would revisit this item and illustrate it with screenshots. This is not new information— I first empirically tested this fact 4 years ago. However, a lot of people wonder how exactly I can identify FFmpeg on the backend when I claim that I’ve written code that helps power YouTube.
Short Answer
How do I know YouTube uses FFmpeg to convert multimedia ? Because :- FFmpeg can decode a number of impossibly obscure multimedia formats using code I wrote
- YouTube can transcode many of the same formats
- I screwed up when I wrote the code to support some of these weird formats
- My mistakes are still present when YouTube transcodes certain fringe formats
Longer Answer (With Pictures !)
Let’s take a video format named RoQ, developed by noted game designer Graeme Devine. Originated for use in the FMV-heavy game The 11th Hour, the format eventually found its way into the Quake 3 engine as well as many games derived from the same technology.Dr. Tim Ferguson reverse engineered the format (though it would later be open sourced along with the rest of the Q3 engine). I wrote a RoQ playback system for FFmpeg, and I messed up in doing so. I believe my coding error helps demonstrate the case I’m trying to make here.
Observe what happened when I pushed the jk02.roq sample through YouTube in my original experiment 4 years ago :
Do you see how the canyon walls bleed into the sky ? That’s not supposed to happen. FFmpeg doesn’t do that anymore but I was able to go back into the source code history to find when it did do that :
Academic Answer
FFmpeg fixed this bug in June of 2007 (thanks to Eric Lasota). The problem had to do with premature colorspace conversion in my original decoder.Leftovers
I tried uploading the video again to see if the problem persists in YouTube’s transcoder. First bit of trivia : YouTube detects when you have uploaded the same video twice and rejects the subsequent attempts. So I created a double concatenation of the video and uploaded it. The problem is gone, illustrating that the backend is actually using a newer version of FFmpeg. This surprises me for somewhat esoteric reasons.Here’s another interesting bit of trivia for those who don’t do a lot of YouTube uploading— YouTube reports format details when you upload a video :
So, yep, RoQ format. And you can wager that this will prompt me to go back through the litany of unusual formats that FFmpeg supports to see how YouTube responds.
-
Computer crashing when using python tools in same script
5 février 2023, par SL1997I am attempting to use the speech recognition toolkit VOSK and the speech diarization package Resemblyzer to transcibe audio and then identify the speakers in the audio.


Tools :


https://github.com/alphacep/vosk-api

https://github.com/resemble-ai/Resemblyzer

I can do both things individually but run into issues when trying to do them when running the one python script.


I used the following guide when setting up the diarization system :




Computer specs are as follows :


Intel(R) Core(TM) i3-7100 CPU @ 3.90GHz, 3912 Mhz, 2 Core(s), 4 Logical Processor(s)

32GB RAM

The following is my code, I am not to sure if using threading is appropriate or if I even implemented it correctly, how can I best optimize this code as to achieve the results I am looking for and not crash.


from vosk import Model, KaldiRecognizer
from pydub import AudioSegment
import json
import sys
import os
import subprocess
import datetime
from resemblyzer import preprocess_wav, VoiceEncoder
from pathlib import Path
from resemblyzer.hparams import sampling_rate
from spectralcluster import SpectralClusterer
import threading
import queue
import gc



def recognition(queue, audio, FRAME_RATE):

 model = Model("Vosk_Models/vosk-model-small-en-us-0.15")

 rec = KaldiRecognizer(model, FRAME_RATE)
 rec.SetWords(True)

 rec.AcceptWaveform(audio.raw_data)
 result = rec.Result()

 transcript = json.loads(result)#["text"]

 #return transcript
 queue.put(transcript)



def diarization(queue, audio):

 wav = preprocess_wav(audio)
 encoder = VoiceEncoder("cpu")
 _, cont_embeds, wav_splits = encoder.embed_utterance(wav, return_partials=True, rate=16)
 print(cont_embeds.shape)

 clusterer = SpectralClusterer(
 min_clusters=2,
 max_clusters=100,
 p_percentile=0.90,
 gaussian_blur_sigma=1)

 labels = clusterer.predict(cont_embeds)

 def create_labelling(labels, wav_splits):

 times = [((s.start + s.stop) / 2) / sampling_rate for s in wav_splits]
 labelling = []
 start_time = 0

 for i, time in enumerate(times):
 if i > 0 and labels[i] != labels[i - 1]:
 temp = [str(labels[i - 1]), start_time, time]
 labelling.append(tuple(temp))
 start_time = time
 if i == len(times) - 1:
 temp = [str(labels[i]), start_time, time]
 labelling.append(tuple(temp))

 return labelling

 #return
 labelling = create_labelling(labels, wav_splits)
 queue.put(labelling)



def identify_speaker(queue1, queue2):

 transcript = queue1.get()
 labelling = queue2.get()

 for speaker in labelling:

 speakerID = speaker[0]
 speakerStart = speaker[1]
 speakerEnd = speaker[2]

 result = transcript['result']
 words = [r['word'] for r in result if speakerStart < r['start'] < speakerEnd]
 #return
 print("Speaker",speakerID,":",' '.join(words), "\n")





def main():

 queue1 = queue.Queue()
 queue2 = queue.Queue()

 FRAME_RATE = 16000
 CHANNELS = 1

 podcast = AudioSegment.from_mp3("Podcast_Audio/Film-Release-Clip.mp3")
 podcast = podcast.set_channels(CHANNELS)
 podcast = podcast.set_frame_rate(FRAME_RATE)

 first_thread = threading.Thread(target=recognition, args=(queue1, podcast, FRAME_RATE))
 second_thread = threading.Thread(target=diarization, args=(queue2, podcast))
 third_thread = threading.Thread(target=identify_speaker, args=(queue1, queue2))

 first_thread.start()
 first_thread.join()
 gc.collect()

 second_thread.start()
 second_thread.join()
 gc.collect()

 third_thread.start()
 third_thread.join()
 gc.collect()

 # transcript = recognition(podcast,FRAME_RATE)
 #
 # labelling = diarization(podcast)
 #
 # print(identify_speaker(transcript, labelling))


if __name__ == '__main__':
 main()



When I say crash I mean everything freezes, I have to hold down the power button on the desktop and turn it back on again. No blue/blank screen, just frozen in my IDE looking at my code. Any help in resolving this issue would be greatly appreciated.