Recherche avancée

Médias (3)

Mot : - Tags -/spip

Autres articles (70)

  • MediaSPIP version 0.1 Beta

    16 avril 2011, par

    MediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

  • 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 ;

Sur d’autres sites (11535)

  • Transcription via OpenAi's whisper : AssertionError : incorrect audio shape

    1er avril 2024, par muratowski

    I'm trying to use OpenAI's open source Whisper library to transcribe audio files.

    


    Here is my script's source code :

    


    import whisper

model = whisper.load_model("large-v2")

# load the entire audio file
audio = whisper.load_audio("/content/file.mp3")
#When i write that code snippet here ==> audio = whisper.pad_or_trim(audio) the first 30 secs are converted and without any problem they are converted.

# make log-Mel spectrogram and move to the same device as the model
mel = whisper.log_mel_spectrogram(audio).to(model.device)

# detect the spoken language
_, probs = model.detect_language(mel)
print(f"Detected language: {max(probs, key=probs.get)}")

# decode the audio
options = whisper.DecodingOptions(fp16=False)
result = whisper.decode(model, mel, options)

# print the recognized text if available
try:
    if hasattr(result, "text"):
        print(result.text)
except Exception as e:
    print(f"Error while printing transcription: {e}")

# write the recognized text to a file
try:
    with open("output_of_file.txt", "w") as f:
        f.write(result.text)
        print("Transcription saved to file.")
except Exception as e:
    print(f"Error while saving transcription: {e}")


    


    In here :

    


    # load the entire audio file
audio = whisper.load_audio("/content/file.mp3")


    


    when I write below : " audio = whisper.pad_or_trim(audio) ", the first 30 secs of the sound file is transcribed without any problem and language detection works as well,

    


    but when I delete it and want the whole file to be transcribed, I get the following error :

    


    


    AssertionError : incorrect audio shape

    


    


    What should I do ? Should I change the structure of the sound file ? If yes, which library should I use and what type of script should I write ?

    


  • How to call ffmpeg main method from Xcode 7.2 ?

    15 mars 2016, par user5761723

    I’m new to iOS app Development. I compiled the ffmpeg-3.0 libraries for iOS. and integrate them into Xcode. but when i try to call main method of ffmpeg.c, it won’t work.

    Can someone tell me the procedure, how to move ahead from here ?. i actually want to convert audio formats.

  • Compiling FFmpeg lib and add it to NDK sources on Windows8

    2 février 2021, par Nativ

    I've seen some articles about how to compile and uses FFmpeg for Android.

    


    These are 2 good examples - example1 and example2

    


    Unfortunately, non off them, or others I found helped me. In those two examples a build_android.sh is created and configure the FFmpeg's configuraion file and call to make. Every time when I'm running the script I'm getting the following error :

    


    c:\android\development\android-ndk-r9\sources\ffmpeg>sh build_android.sh
c:/android/development/android-ndk-r9/toolchains/arm-linux-androideabi-4.8/prebu
ilt/windows-x86_64/arm-linux-androideabi/bin/bin/arm-linux-androideabi-gcc is un

able to create an executable file.
C compiler test failed.

If you think configure made a mistake, make sure you are using the latest
version from Git.  If the latest version fails, report the problem to the
ffmpeg-user@ffmpeg.org mailing list or IRC #ffmpeg on irc.freenode.net.
Include the log file "config.log" produced by configure as this will help
solving the problem.
Makefile:2: config.mak: No such file or directory
Makefile:49: /common.mak: No such file or directory
Makefile:92: /libavutil/Makefile: No such file or directory
Makefile:92: /library.mak: No such file or directory
Makefile:169: /doc/Makefile: No such file or directory
Makefile:170: /tests/Makefile: No such file or directory
make: *** No rule to make target `/tests/Makefile'.  Stop.
Makefile:2: config.mak: No such file or directory


    


    If someone encountered and solved this issue it'll be much appreciated !

    


    After trying the suggested script I ran into a new problem that I couldn't solved, this is the output of the script :

    


    .... Enabled components list....

    


    In the end of the list I got the following :

    


    Enabled indevs :
dv1394 v4l2i
fbdev

    


    Enabled outdevs :
fbdev v4l2

    


    License : LGPL version 2.1 or later
Creating config.mak, config.h, and doc/config.texi...

    


    WARNING : C :/android/development/android-ndk-r9/toolchains/arm-linux-androideabi-
4.8/prebuilt/windows-x86_64/bin/arm-linux-androideabi-pkg-config not found, libr
ary detection may fail.
make : *** No rule to make target libavfilter/libavfilter.so', needed by all-ye
s'. Stop.
make : *** No rule to make target install-libavfilter-shared', needed by instal
l-libs-yes'. Stop.