Recherche avancée

Médias (1)

Mot : - Tags -/école

Autres articles (48)

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

    Mediaspip core
    autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs

  • HTML5 audio and video support

    13 avril 2011, par

    MediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
    The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
    For older browsers the Flowplayer flash fallback is used.
    MediaSPIP allows for media playback on major mobile platforms with the above (...)

  • 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 (9672)

  • Speech recognition with python-telegram-bot without downloading an audio file

    25 juin 2022, par linz

    I'm developing a telegram bot in which the user sends a voice message, the bot transcribes it and sends back what was said in text.
For that I am using the python-telegram-bot library and the speech_recognition library with the google engine.
My problem is, the voice messages sent by the users are .mp3, however in order to transcribe them i need to convert them to .wav. In order to do that I have to download the file sent to the bot.
Is there a way to avoid that ? I understand this is not an efficient and a safe way to do this since many active users at once will result in race conditions and takes a lot of space.

    


    
def voice_handler(update, context):
    bot = context.bot
    file = bot.getFile(update.message.voice.file_id)
    file.download('voice.mp3')
    filename = "voice.wav"
    
    # convert mp3 to wav file
    subprocess.call(['ffmpeg', '-i', 'voice.mp3',
                         'voice.wav', '-y'])

    # initialize the recognizer
    r = sr.Recognizer()
    
    # open the file
    with sr.AudioFile(filename) as source:
    
        # listen for the data (load audio to memory)
        audio_data = r.record(source)
        # recognize (convert from speech to text)
        text = r.recognize_google(audio_data, language='ar-AR')
        
        
def main() -> None:
    updater.dispatcher.add_handler(MessageHandler(Filters.voice, voice_handler)) 



    


  • avcodec/ffv1dec : Remove redundant writes, fix races

    21 avril 2021, par Andreas Rheinhardt
    avcodec/ffv1dec : Remove redundant writes, fix races
    

    Every modification of the data that is copied in update_thread_context()
    is a data race if it happens after ff_thread_finish_setup. ffv1dec's
    update_thread_context() simply uses memcpy for updating the new context,
    so that every modification of the src's context is a race.
    Some of these modifications are unnecessary : picture_number is write-only
    for the decoder and cur will be reset when decoding the next frame anyway.
    So remove them. And while just at it, also don't set cur for the slice
    contexts as this variable is write-only.

    Reviewed-by : Anton Khirnov <anton@khirnov.net>
    Signed-off-by : Andreas Rheinhardt <andreas.rheinhardt@outlook.com>

    • [DH] libavcodec/ffv1dec.c
  • lavu/vulkan : add support for using libshaderc as a GLSL compiler

    19 novembre 2021, par Lynne
    lavu/vulkan : add support for using libshaderc as a GLSL compiler
    

    It's got a much better API that's actually maintained, it eliminates
    race conditions, it comes with a pkg-config file by default, and
    unfortunately isn't currently packaged by Debian or other large
    distributions.

    • [DH] configure
    • [DH] libavutil/vulkan.c
    • [DH] libavutil/vulkan_shaderc.c