Recherche avancée

Médias (39)

Mot : - Tags -/audio

Autres articles (52)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • Ecrire une actualité

    21 juin 2013, par

    Présentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
    Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
    Vous pouvez personnaliser le formulaire de création d’une actualité.
    Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

Sur d’autres sites (7890)

  • Revert "lavc/nvenc : handle frame durations and AV_CODEC_CAP_ENCODER_REORDERED_OPAQUE"

    16 juin 2023, par Timo Rothenpieler
    Revert "lavc/nvenc : handle frame durations and AV_CODEC_CAP_ENCODER_REORDERED_OPAQUE"
    

    The implementation is flawed in that the frame opaque data is not in
    fact correctly reordered along with the packets, but is being output in
    packet input order, just like the dts are.

    This reverts commit 35538097038fd1e36577306d3165f38c8fa02466.

    • [DH] libavcodec/nvenc.c
    • [DH] libavcodec/nvenc.h
    • [DH] libavcodec/nvenc_av1.c
    • [DH] libavcodec/nvenc_h264.c
    • [DH] libavcodec/nvenc_hevc.c
  • lavc/qsvenc : avoid data copy if possible

    18 mai 2023, par Haihao Xiang
    lavc/qsvenc : avoid data copy if possible
    

    The data copy is unnecessary for packed formats when frame width and
    height are aligned

    For example :
    $ ffmpeg -f lavfi -i testsrc=size=1920x1088 -vf "format=yuyv422" -c:v hevc_qsv -f null -

    Signed-off-by : Haihao Xiang <haihao.xiang@intel.com>

    • [DH] libavcodec/qsvenc.c
  • Title : Getting "invalid_request_error" when trying to pass converted audio file to OpenAI API

    19 avril 2023, par Dummy Cron

    I am working on a project where I receive a URL from a webhook on my server whenever users share a voice note on my WhatsApp. I am using WATI as my WhatsApp API Provder

    &#xA;

    The file URL received is in the .opus format, which I need to convert to WAV and pass to the OpenAI Whisper API translation task.

    &#xA;

    I am trying convert it to .wav using ffmpeg, and pass it to the OpenAI API for translation processing.&#xA;However, I am getting an "invalid_request_error"

    &#xA;

    import requests&#xA;import io&#xA;import subprocess&#xA;file_url = #.opus file url&#xA;api_key = #WATI API Keu&#xA;&#xA;def transcribe_audio_to_text():&#xA;  # Fetch the audio file and convert to wav format&#xA;&#xA;  headers = {&#x27;Authorization&#x27;: f&#x27;Bearer {api_key}&#x27;}&#xA;  response = requests.get(file_url, headers=headers)&#xA;  audio_bytes = io.BytesIO(response.content)&#xA;&#xA;  process = subprocess.Popen([&#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;-&#x27;, &#x27;-f&#x27;, &#x27;wav&#x27;, &#x27;-acodec&#x27;, &#x27;libmp3lame&#x27;, &#x27;-&#x27;], stdin=subprocess.PIPE, stdout=subprocess.PIPE)&#xA;  wav_audio, _ = process.communicate(input=audio_bytes.read())&#xA;&#xA;  # Set the Whisper API endpoint and headers&#xA;  WHISPER_API_ENDPOINT = &#x27;https://api.openai.com/v1/audio/translations&#x27;&#xA;  whisper_api_headers = {&#x27;Authorization&#x27;: &#x27;Bearer &#x27; &#x2B; WHISPER_API_KEY,&#xA;                         &#x27;Content-Type&#x27;: &#x27;application/json&#x27;}&#xA;  print(whisper_api_headers)&#xA;  # Send the audio file for transcription&#xA;&#xA;  payload = {&#x27;model&#x27;: &#x27;whisper-1&#x27;}&#xA;  files = {&#x27;file&#x27;: (&#x27;audio.wav&#x27;, io.BytesIO(wav_audio), &#x27;audio/wav&#x27;)}&#xA;&#xA;  # files = {&#x27;file&#x27;: (&#x27;audio.wav&#x27;, io.BytesIO(wav_audio), &#x27;application/octet-stream&#x27;)}&#xA;&#xA;  # files = {&#x27;file&#x27;: (&#x27;audio.mp3&#x27;, io.BytesIO(mp3_audio), &#x27;audio/mp3&#x27;)}&#xA;  response = requests.post(WHISPER_API_ENDPOINT, headers=whisper_api_headers, data=payload)&#xA;  print(response)&#xA;  # Get the transcription text&#xA;  if response.status_code == 200:&#xA;      result = response.json()&#xA;      text = result[&#x27;text&#x27;]&#xA;      print(response, text)&#xA;  else:&#xA;      print(&#x27;Error:&#x27;, response)&#xA;      err = response.json()&#xA;      print(response.status_code)&#xA;      print(err)&#xA;      print(response.headers)&#xA;&#xA;transcribe_audio_to_text()&#xA;

    &#xA;

    Output :

    &#xA;

    Error: <response>&#xA;400&#xA;{&#x27;error&#x27;: {&#x27;message&#x27;: "We could not parse the JSON body of your request. (HINT: This likely means you aren&#x27;t using your HTTP library correctly. The OpenAI API expects a JSON payload, but what was sent was not valid JSON. If you have trouble figuring out how to fix this, please send an email to support@openai.com and include any relevant code you&#x27;d like help with.)", &#x27;type&#x27;: &#x27;invalid_request_error&#x27;, &#x27;param&#x27;: None, &#x27;code&#x27;: None}}&#xA;</response>

    &#xA;