
Recherche avancée
Médias (91)
-
DJ Z-trip - Victory Lap : The Obama Mix Pt. 2
15 septembre 2011
Mis à jour : Avril 2013
Langue : English
Type : Audio
-
Matmos - Action at a Distance
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
DJ Dolores - Oslodum 2004 (includes (cc) sample of “Oslodum” by Gilberto Gil)
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Danger Mouse & Jemini - What U Sittin’ On ? (starring Cee Lo and Tha Alkaholiks)
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Cornelius - Wataridori 2
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
The Rapture - Sister Saviour (Blackstrobe Remix)
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
Autres articles (59)
-
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. -
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 (...) -
De l’upload à la vidéo finale [version standalone]
31 janvier 2010, parLe chemin d’un document audio ou vidéo dans SPIPMotion est divisé en trois étapes distinctes.
Upload et récupération d’informations de la vidéo source
Dans un premier temps, il est nécessaire de créer un article SPIP et de lui joindre le document vidéo "source".
Au moment où ce document est joint à l’article, deux actions supplémentaires au comportement normal sont exécutées : La récupération des informations techniques des flux audio et video du fichier ; La génération d’une vignette : extraction d’une (...)
Sur d’autres sites (7216)
-
HLS stream plays in VLC not in Safari
7 janvier 2021, par Myles McDonnellI have created a HLS stream using FFMPEG using this command :


ffmpeg -i 10-brass-in-pocket.flac -map 0:a -map 0:a -map 0:a -map 0:a -c:a:0 flac -c:a:1 aac -c:a:2 aac -c:a:3 aac -b:a:1 320k -b:a:2 160k -b:a:3 96k -f hls -hls_playlist_type vod -master_pl_name master.m3u8 -var_stream_map "a:0 a:1 a:2 a:3" stream_%v.m3u8


see master playlist here : https://di5wym8npn4cm.cloudfront.net/ffmpeg/master.m3u8


It has for sub-streams ;


- 

- 1 FLAC @ 44.1Hz / 16bit
- 2 AAC-LC 320
- 3 AAC-LC 160
- 4 AAC-LC 96










It works if I play that URL in VLC but if I use that URL in a HTML5 control and load in Safari the loader spins and I can see from the dev tools the data being pulled down but it doesn't play, see here : https://di5wym8npn4cm.cloudfront.net/ffmpeg/index.html


Why doesn't this play in Safari and how can I debug this ?


-
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 ?

-
Why do I get UnknownValueError when trying to run .recognize_google ?
21 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 ?