Recherche avancée

Médias (91)

Autres articles (8)

  • XMP PHP

    13 mai 2011, par

    Dixit Wikipedia, XMP signifie :
    Extensible Metadata Platform ou XMP est un format de métadonnées basé sur XML utilisé dans les applications PDF, de photographie et de graphisme. Il a été lancé par Adobe Systems en avril 2001 en étant intégré à la version 5.0 d’Adobe Acrobat.
    Étant basé sur XML, il gère un ensemble de tags dynamiques pour l’utilisation dans le cadre du Web sémantique.
    XMP permet d’enregistrer sous forme d’un document XML des informations relatives à un fichier : titre, auteur, historique (...)

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

  • Contribute to a better visual interface

    13 avril 2011

    MediaSPIP 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 (4151)

  • Why does OpenAI Whisper return "None" ?

    29 septembre 2024, par SHDDSFFDSDSAF

    I'm trying to transcribe an MP3 file using OpenAI’s Whisper model, but the transcriptions.create() method consistently returns None. I’ve tried different MP3 files, converted them to WAV, updated the OpenAI library, and added error handling, but I still can’t figure out the issue.

    


    Here’s my code :

    


    from openai import OpenAI

client = OpenAI(
    api_key="MYAPIKEY"
)

audio_file = open("speech.mp3", "rb")
transcript = client.audio.transcriptions.create(
    file=audio_file,
    model="whisper-1",
    response_format="verbose_json",
    timestamp_granularities=["segment"]
)

print(transcript)


    


    I’ve confirmed that :

    


      

    • The API key is valid.
    • 


    • I’m using OpenAI Python library version X.X.X.
    • 


    • I’ve tested both MP3 and WAV formats.
    • 


    • The MP3 file is valid (checked using ffmpeg).
    • 


    


    The response always returns None without any exceptions. Any ideas on what could be going wrong ?

    


  • ffmpeg + play video loop

    3 septembre 2013, par Javier Ramírez

    Does anyone know how to make a video using ffmpeg + Opengl play continuously ?. Because this is only played once

    tiempo = glfwGetTime();
    duracion = 1.0/25.0; // 1 second / 25 fps

    while(1){

    ...        

     if(glfwGetTime() > tiempo + duracion){
       if(av_read_frame(pFormatCtx,&packet) >= 0){
         if(packet.stream_index == 0){
           avcodec_decode_video2(pCodecCtx,pFrame,&frameFin,&packet);
           if(frameFin)sws_scale(img_convert_ctx,pFrame->data,pFrame->linesize,0,pCodecCtx->height,pFrameRGB->data,pFrameRGB->linesize);
         }
         av_free_packet(&packet);
       }
       tiempo += duracion;
     }

    ...

    }

    I know av_read_frame function (...) returns 0 if the end of file. But how do I make the function again returns a value other than zero ? o How I can I make the video is constantly repeated ?

  • bytestream : Make get_bytes_left compatible with overread

    14 décembre 2019, par Andreas Rheinhardt
    bytestream : Make get_bytes_left compatible with overread
    

    bytestream2_get_bytes_left returns an unsigned int ; as a result,
    it returns big positive numbers if an overread already happened,
    making it unsuitable for scenarios where one wants to allow this
    in a controlled way (because the buffer is actually padded so that
    no segfaults can happen). So change it to return an ordinary int.

    Also, bytestream2_get_bytes_left_p has been modified in the same way.

    Signed-off-by : Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
    Signed-off-by : Michael Niedermayer <michael@niedermayer.cc>

    • [DH] libavcodec/bytestream.h