
Recherche avancée
Médias (91)
-
DJ Z-trip - Victory Lap : The Obama Mix Pt. 2
15 septembre 2011
Mis à jour : Avril 2013
Langue : English
Type : Audio
-
Matmos - Action at a Distance
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
DJ Dolores - Oslodum 2004 (includes (cc) sample of “Oslodum” by Gilberto Gil)
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Danger Mouse & Jemini - What U Sittin’ On ? (starring Cee Lo and Tha Alkaholiks)
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Cornelius - Wataridori 2
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
The Rapture - Sister Saviour (Blackstrobe Remix)
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
Autres articles (11)
-
Supporting all media types
13 avril 2011, parUnlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)
-
Organiser par catégorie
17 mai 2013, parDans MédiaSPIP, une rubrique a 2 noms : catégorie et rubrique.
Les différents documents stockés dans MédiaSPIP peuvent être rangés dans différentes catégories. On peut créer une catégorie en cliquant sur "publier une catégorie" dans le menu publier en haut à droite ( après authentification ). Une catégorie peut être rangée dans une autre catégorie aussi ce qui fait qu’on peut construire une arborescence de catégories.
Lors de la publication prochaine d’un document, la nouvelle catégorie créée sera proposée (...) -
Les thèmes de MediaSpip
4 juin 20133 thèmes sont proposés à l’origine par MédiaSPIP. L’utilisateur MédiaSPIP peut rajouter des thèmes selon ses besoins.
Thèmes MediaSPIP
3 thèmes ont été développés au départ pour MediaSPIP : * SPIPeo : thème par défaut de MédiaSPIP. Il met en avant la présentation du site et les documents média les plus récents ( le type de tri peut être modifié - titre, popularité, date) . * Arscenic : il s’agit du thème utilisé sur le site officiel du projet, constitué notamment d’un bandeau rouge en début de page. La structure (...)
Sur d’autres sites (3603)
-
Anomalie #3035 (Nouveau) : Association de mots-clés et autorisation
6 août 2013, par Joseph LarmarangeCréation d’un ticket suite à http://permalink.gmane.org/gmane.comp.web.spip.devel/64550
Cas de figure :
- des groupes de mots-clés pour lesquels les rédacteurs ont les droits pour ajouter un mot clé de ces groupes.
- un rédacteur qui visualise un article dont il n’est pas l’auteur et par conséquent pour lequel il n’a pas les droits d’ajouter ou de supprimer un mot-clé.Néanmoins, ce rédacteur va voir la liste des mots-clés associés à cet article, avec un lien pour supprimer les mots-clés en question, un lien ’Ajouter des mots-clés’ lui permettant de charger le formulaire d’ajout de mot-clé.
Si ce rédacteur décide de faire l’une de ces actions (ajout ou suppression), le bloc va se recharger, l’action ne sera pas exécutée et il n’y aura aucun message d’erreur, par exemple pour avertir que l’on n’a pas les droits nécessaires. On a donc une incohérence de l’interface.
En investigant, j’aperçois plusieurs points qui font défaut.
En premier lieu, la fonction autoriser_associermots_dist() regarde simplement si un auteur à le droit en général d’associer des mots-clés d’un groupe en fonction de son statut (admin ou rédacteur) mais ne prends pas en compte si l’individu a le droit de modifier l’objet en question.
Le formulaire EDITER_LIENS du core regarde dans sa fonction charger l’autorisation associerobjets (donc associermots dans notre cas de figure) pour savoir si le formulaire est editable ou non. Dans sa fonction traiter, le formulaire regarde simplement si l’individu a le droit de modifier l’objet en question ou non (mais ne revérifie pas qu’il a les droits d’associer l’objet en question). Par ailleurs, si on n’a pas les droits requis, la fonction traiter ne renvoie pas de message d’erreur.
Le squelette prive/objets/liste/mots_lies.html ne tient compte ni de #ENVeditable ni d’une quelconque autorisation pour afficher ou non un lien de suppression d’un mot-clé.
La fonction autoriser_groupemots_afficherselecteurmots_dist renvoie toujours true.
Propositions d’évolution
- Faire évoluer l’autorisation associermots pour qu’elle vérifie également, si un $id_objet est passé, que l’invidu a les droits de modifier l’objet en question. Cela permettra que la propriété editable soit correctement renseignée dans le formulaire d’ajout de mot-clé. Par ailleurs, pour les plugins ayant besoin de savoir si quelqu’un a le droit d’associer un mot-clé, cela fera une seule auorisation à vérifier (le problème s’est posé avec coche_mots).
- La fonction traiter de éditer_liens devrait dépendre de associermot (il faut vérifier que cela n’a pas d’incidence pour les autres tables de liens) et non des droits de modification d’un objet. Ces droits peuvent être différents dans un contexte d’autorisations personnalisées.
- Cette même fonction traiter doit renvoyer un message d’erreur si on n’a pas les droits suffisants.
- Le squelette prive/objets/liste/mots_lies.html doit vérifier l’autorisation associermots pour afficher un lien de suppression d’un mot-clé.
- Par cohérence, la fonction autoriser_groupemots_afficherselecteurmots_dist est modifiée pour renvoyer, par défaut, le résultat de l’autorisation associermots.
-
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.


-
How to make your plugin multilingual – Introducing the Piwik Platform
29 octobre 2014, par Thomas Steur — DevelopmentThis is the next post of our blog series where we introduce the capabilities of the Piwik platform (our previous post was Generating test data – Introducing the Piwik Platform). This time you’ll learn how to equip your plugin with translations. Users of your plugin will be very thankful that they can use and translate the plugin in their language !
Getting started
In this post, we assume that you have already set up your development environment and created a plugin. If not, visit the Piwik Developer Zone where you’ll find the tutorial Setting up Piwik and other Guides that help you to develop a plugin.
Managing translations
Piwik is available in over 50 languages and comes with many translations. The core itself provides some basic translations for words like “Visitor” and “Help”. They are stored in the directory
/lang
. In addition, each plugin can provide its own translations for wordings that are used in this plugin. They are located in/plugins/*/lang
. In those directories you’ll find one JSON file for each language. Each language file consists in turn of tokens that belong to a group.{
"MyPlugin":{
"BlogPost": "Blog post",
"MyToken": "My translation",
"InteractionRate": "Interaction Rate"
}
}A group usually represents the name of a plugin, in this case “MyPlugin”. Within this group, all the tokens are listed on the left side and the related translations on the right side.
Building a translation key
As you will later see to actually translate a word or a sentence you’ll need to know the corresponding translation key. This key is built by combining a group and a token separated by an underscore. You can for instance use the key
MyPlugin_BlogPost
to get a translation of “Blog post”. Defining a new key is as easy as adding a new entry to the “MyPlugin” group.Providing default translations
If a translation cannot be found then the English translation will be used as a default. Therefore, you should always provide a default translation in English for all keys in the file
en.json
(ie,/plugins/MyPlugin/lang/en.json
).Adding translations for other languages
This is as easy as creating new files in the lang subdirectory of your plugin. The filename consists of a 2 letter ISO 639-1 language code completed by the extension
.json
. This means German translations go into a file namedde.json
, French ones into a file namedfr.json
. To see a list of languages you can use have a look at the /lang directory.Reusing translations
As mentioned Piwik comes with quite a lot of translations. You can and should reuse them but you are supposed to be aware that a translation key might be removed or renamed in the future. It is also possible that a translation key was added in a recent version and therefore is not available in older versions of Piwik. We do not currently announce any of such changes. Still, 99% of the translation keys do not change and it is therefore usually a good idea to reuse existing translations. Especially when you or your company would otherwise not be able to provide them. To find any existing translation keys go to Settings => Translation search in your Piwik installation. The menu item will only appear if the development mode is enabled.
Translations in PHP
Use the Piwik::translate() function to translate any text in PHP. Simply pass any existing translation key and you will get the translated text in the language of the current user in return. The English translation will be returned in case none for the current language exists.
$translatedText = Piwik::translate('MyPlugin_BlogPost');
Translations in Twig Templates
To translate text in Twig templates, use the translate filter.
{{ 'MyPlugin_BlogPost'|translate }}
Contributing translations to Piwik
Did you know you can contribute translations to Piwik ? In case you want to improve an existing translation, translate a missing one or add a new language go to Piwik Translations and sign up for an account. You won’t need any knowledge in development to do this.
Advanced features
Of course there are more useful things you can do with translations. For instance you can use placeholders like
%s
in your translations and you can use translations in JavaScript as well. In case you want to know more about those topics check out our Internationalization guide. Currently, this guide only covers translations but we will cover more topics like formatting numbers and handling currencies in the future.Congratulations, you have learnt how to make your plugin multilingual !
If you have any feedback regarding our APIs or our guides in the Developer Zone feel free to send it to us.