Recherche avancée

Médias (1)

Mot : - Tags -/MediaSPIP 0.2

Autres articles (77)

  • Pas question de marché, de cloud etc...

    10 avril 2011

    Le vocabulaire utilisé sur ce site essaie d’éviter toute référence à la mode qui fleurit allègrement
    sur le web 2.0 et dans les entreprises qui en vivent.
    Vous êtes donc invité à bannir l’utilisation des termes "Brand", "Cloud", "Marché" etc...
    Notre motivation est avant tout de créer un outil simple, accessible à pour tout le monde, favorisant
    le partage de créations sur Internet et permettant aux auteurs de garder une autonomie optimale.
    Aucun "contrat Gold ou Premium" n’est donc prévu, aucun (...)

  • Des sites réalisés avec MediaSPIP

    2 mai 2011, par

    Cette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
    Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page.

  • Support audio et vidéo HTML5

    10 avril 2011

    MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
    Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
    Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
    Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...)

Sur d’autres sites (10152)

  • MAINTAINERS : Split project server admin list

    6 août 2022, par Michael Niedermayer
    MAINTAINERS : Split project server admin list
    

    This updates the list closer to reality.
    Iam not a professional server admin, iam happy to help maintain the box as i have
    done in the past. But iam not qualified nor volunteering to fix sudden problems
    nor do i do major upgrades (i lack the experience to recover the box remotely if
    something goes wrong) and also iam not maintaining backups ATM (our backup system
    had a RAID-5 failure, raz is working on setting a new one up)

    Maybe this should be signaled in a different way than spliting the lines but ATM
    people ping me if something is wrong and what i do is mainly mail/ping raz
    and try to find another root admin so raz is not the only active & professional
    admin on the team. It would be more efficient if people contact raz and others
    directly instead of depending on my waking up and forwarding a "ffmpeg.org" is down note

    Signed-off-by : Michael Niedermayer <michael@niedermayer.cc>

    • [DH] MAINTAINERS
  • Computer crashing when using python tools in same script

    5 février 2023, par SL1997

    I 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.

    &#xA;

    Tools :

    &#xA;

    https://github.com/alphacep/vosk-api
    &#xA;https://github.com/resemble-ai/Resemblyzer

    &#xA;

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

    &#xA;

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

    &#xA;

    https://medium.com/saarthi-ai/who-spoke-when-build-your-own-speaker-diarization-module-from-scratch-e7d725ee279

    &#xA;

    Computer specs are as follows :

    &#xA;

    Intel(R) Core(TM) i3-7100 CPU @ 3.90GHz, 3912 Mhz, 2 Core(s), 4 Logical Processor(s)
    &#xA;32GB RAM

    &#xA;

    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.

    &#xA;

    from vosk import Model, KaldiRecognizer&#xA;from pydub import AudioSegment&#xA;import json&#xA;import sys&#xA;import os&#xA;import subprocess&#xA;import datetime&#xA;from resemblyzer import preprocess_wav, VoiceEncoder&#xA;from pathlib import Path&#xA;from resemblyzer.hparams import sampling_rate&#xA;from spectralcluster import SpectralClusterer&#xA;import threading&#xA;import queue&#xA;import gc&#xA;&#xA;&#xA;&#xA;def recognition(queue, audio, FRAME_RATE):&#xA;&#xA;    model = Model("Vosk_Models/vosk-model-small-en-us-0.15")&#xA;&#xA;    rec = KaldiRecognizer(model, FRAME_RATE)&#xA;    rec.SetWords(True)&#xA;&#xA;    rec.AcceptWaveform(audio.raw_data)&#xA;    result = rec.Result()&#xA;&#xA;    transcript = json.loads(result)#["text"]&#xA;&#xA;    #return transcript&#xA;    queue.put(transcript)&#xA;&#xA;&#xA;&#xA;def diarization(queue, audio):&#xA;&#xA;    wav = preprocess_wav(audio)&#xA;    encoder = VoiceEncoder("cpu")&#xA;    _, cont_embeds, wav_splits = encoder.embed_utterance(wav, return_partials=True, rate=16)&#xA;    print(cont_embeds.shape)&#xA;&#xA;    clusterer = SpectralClusterer(&#xA;        min_clusters=2,&#xA;        max_clusters=100,&#xA;        p_percentile=0.90,&#xA;        gaussian_blur_sigma=1)&#xA;&#xA;    labels = clusterer.predict(cont_embeds)&#xA;&#xA;    def create_labelling(labels, wav_splits):&#xA;&#xA;        times = [((s.start &#x2B; s.stop) / 2) / sampling_rate for s in wav_splits]&#xA;        labelling = []&#xA;        start_time = 0&#xA;&#xA;        for i, time in enumerate(times):&#xA;            if i > 0 and labels[i] != labels[i - 1]:&#xA;                temp = [str(labels[i - 1]), start_time, time]&#xA;                labelling.append(tuple(temp))&#xA;                start_time = time&#xA;            if i == len(times) - 1:&#xA;                temp = [str(labels[i]), start_time, time]&#xA;                labelling.append(tuple(temp))&#xA;&#xA;        return labelling&#xA;&#xA;    #return&#xA;    labelling = create_labelling(labels, wav_splits)&#xA;    queue.put(labelling)&#xA;&#xA;&#xA;&#xA;def identify_speaker(queue1, queue2):&#xA;&#xA;    transcript = queue1.get()&#xA;    labelling = queue2.get()&#xA;&#xA;    for speaker in labelling:&#xA;&#xA;        speakerID = speaker[0]&#xA;        speakerStart = speaker[1]&#xA;        speakerEnd = speaker[2]&#xA;&#xA;        result = transcript[&#x27;result&#x27;]&#xA;        words = [r[&#x27;word&#x27;] for r in result if speakerStart &lt; r[&#x27;start&#x27;] &lt; speakerEnd]&#xA;        #return&#xA;        print("Speaker",speakerID,":",&#x27; &#x27;.join(words), "\n")&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;def main():&#xA;&#xA;    queue1 = queue.Queue()&#xA;    queue2 = queue.Queue()&#xA;&#xA;    FRAME_RATE = 16000&#xA;    CHANNELS = 1&#xA;&#xA;    podcast = AudioSegment.from_mp3("Podcast_Audio/Film-Release-Clip.mp3")&#xA;    podcast = podcast.set_channels(CHANNELS)&#xA;    podcast = podcast.set_frame_rate(FRAME_RATE)&#xA;&#xA;    first_thread = threading.Thread(target=recognition, args=(queue1, podcast, FRAME_RATE))&#xA;    second_thread = threading.Thread(target=diarization, args=(queue2, podcast))&#xA;    third_thread = threading.Thread(target=identify_speaker, args=(queue1, queue2))&#xA;&#xA;    first_thread.start()&#xA;    first_thread.join()&#xA;    gc.collect()&#xA;&#xA;    second_thread.start()&#xA;    second_thread.join()&#xA;    gc.collect()&#xA;&#xA;    third_thread.start()&#xA;    third_thread.join()&#xA;    gc.collect()&#xA;&#xA;    # transcript = recognition(podcast,FRAME_RATE)&#xA;    #&#xA;    # labelling = diarization(podcast)&#xA;    #&#xA;    # print(identify_speaker(transcript, labelling))&#xA;&#xA;&#xA;if __name__ == &#x27;__main__&#x27;:&#xA;    main()&#xA;

    &#xA;

    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.

    &#xA;

  • How to make your plugin multilingual – Introducing the Piwik Platform

    29 octobre 2014, par Thomas Steur — Development

    This 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 named de.json, French ones into a file named fr.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.