
Recherche avancée
Médias (91)
-
Chuck D with Fine Arts Militia - No Meaning No
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Paul Westerberg - Looking Up in Heaven
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Le Tigre - Fake French
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Thievery Corporation - DC 3000
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Dan the Automator - Relaxation Spa Treatment
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Gilberto Gil - Oslodum
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
Autres articles (57)
-
Ajouter des informations spécifiques aux utilisateurs et autres modifications de comportement liées aux auteurs
12 avril 2011, parLa manière la plus simple d’ajouter des informations aux auteurs est d’installer le plugin Inscription3. Il permet également de modifier certains comportements liés aux utilisateurs (référez-vous à sa documentation pour plus d’informations).
Il est également possible d’ajouter des champs aux auteurs en installant les plugins champs extras 2 et Interface pour champs extras. -
Les tâches Cron régulières de la ferme
1er décembre 2010, parLa gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
Le super Cron (gestion_mutu_super_cron)
Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...) -
Support audio et vidéo HTML5
10 avril 2011MediaSPIP 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 (6708)
-
Why are there multiple .m3u8 requests made by the browser ?
20 mai 2020, par 47fa0cI usually download my lectures instead of watching them on the online player provided by my university. I do this by finding requests that include .m3u8 in their url. There always seems to be two of these for each of the videos that I want to download, with one slight difference in the urls but otherwise identical. Why is that the case ?



My wild guess is that one of them is supposed act as a backup if the other failed to fetch but I am not sure.



I can't share the urls as they contain copyrighted material but it looks something like



domain/a/b/hashedvalue1/c/video.mp4/index.m3u8




and



domain/a/b/hashedvalue2/c/video.mp4/index.m3u8




Thanks for your help :)


-
Encode photos into (some) video format in Android
17 juillet 2014, par user2011769In my app I need to convert photos (taken by the user) into some playable (on both Android device and pc web browser) vide format.
My first and obvious choice was GIF, I’ve managed to get it working using this https://github.com/nbadal/android-gif-encoder but the result was of very poor quality. What I didn’t now was gif is a terrible standard - only 256 colors per frame, virtually no compression, so for my purposes it’s useless.
I know it is possible to use ffmpeg for this, but I have no experience with NDK (and I’ve used C only at the university).
Are there any other options worth exploring ?
EDIT : it needs to work on ICS (minSdkVersion=15)
-
Why do I get UnknownValueError() speech_recognition.UnknownValueError when trying to run .recognize_google ?
20 juillet 2022, par John SmithFollowing code is meant to transcribe a long audio file to text. It is to do this piece by piece.
trimmed.wav
holds a 15-second-long piece of a longer audio file (whose path is stored infname
) :

#!/usr/bin/env python3

from subprocess import run
from sys import exit

italic = '\33[3m'
end = '\33[m'

try:
 from speech_recognition import AudioFile, Recognizer
except:
 run("pip3 install SpeechRecognition", shell=True)
 from speech_recognition import AudioFile, Recognizer

def transcribe_piece(fname, lang, stime):
 extension = fname[-3:]
 etime = stime + 15
 cmd = f"ffmpeg -ss {stime} -to {etime} -i {fname} -c copy trimmed.{extension} >/dev/null 2>&1"
 run(cmd, shell=True)
 cmd = f"ffmpeg -i trimmed.{extension} -f wav trimmed.wav >/dev/null 2>&1"
 run(cmd, shell=True)
 r = Recognizer() 
 af = AudioFile("trimmed.wav")
 with af as source:
 r.adjust_for_ambient_noise(source)
 audio = r.record(source)
 t = r.recognize_google(audio, language=lang)#UnknownValueError() speech_recognition.UnknownValueError
 print(f"{italic}{t}{end}")
 with open("of", "w") as f:
 f.write(f"{t}\n")
 run(f"rm trimmed.{extension}", shell=True) 
 run(f"rm trimmed.wav", shell=True)
 
 

fname = input("File name? Skip the path if the file is in CWD. The usage of ~ is allowed.\n")

lang = input("""Specify one of the following languages:
fr-BE, fr-CA, fr-FR, fr-CH

en-AU, en-CA, en-GH, en-HK, en-IN, en-IE, en-KE, en-NZ, en-PK, en-PH, en-SG, en-ZA, en-TZ, en-GB, en-US

es-AR, es-BO, es-BO, es-CL, es-CO, es-CR, es-DO, es-EC, es-SV, es-SV, es-GT, es-HN, es-MX, es-NI, es-PA, es-PY, es-PE, es-PR, es-ES, es-US, es-UY, es-VE\n""")


#for stime in range(0, 10000, 15):
# try:
# transcribe_piece(fname, lang, stime)
# except:
# run("shred -u trimmed.wav" , shell=True) 
 #run("shred -u trimmed.wav >/dev/null 2>&1" , shell=True) 
# exit(0)
 
for stime in range(0, 10000, 15):#this loop is only for the sake of debugging, use try/except above
 transcribe_piece(fname, lang, stime)




It gives me the following error :


Traceback (most recent call last):
 File "/home/jim/CS/SoftwareDevelopment/MySoftware/Python/speech-to-text/long-audio-to-text.py", line 61, in <module>
 transcribe_piece(fname, lang, stime)
 File "/home/jim/CS/SoftwareDevelopment/MySoftware/Python/speech-to-text/long-audio-to-text.py", line 31, in transcribe_piece
 t = r.recognize_google(audio, language=lang)
 File "/home/jim/.local/lib/python3.10/site-packages/speech_recognition/__init__.py", line 858, in recognize_google
 if not isinstance(actual_result, dict) or len(actual_result.get("alternative", [])) == 0: raise UnknownValueError()
speech_recognition.UnknownValueError

</module>


The said error refers to line 31, that is
t = r.recognize_google(audio, language=lang)
.
Why do I get this error ? How might I rewrite this code so that such error does not appear ?