Bonjour,
Je commence � apprendre le langage et j'ai install� python 2.7 avec IDLE sur Windows cette semaine.
J'essaie de lire un fichier .wav avec le module wave. Avec l'aide en ligne, j'ai bricol� un script (cf. ci dessous) mais je n'entends aucun son. J'ai peur d'�tre � c�t� de la plaque.
Est-ce qu'une �me charitable pourrait me d�bloquer ? Merci d'avance
Code : S�lectionner tout - Visualiser dans une fen�tre � part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 #! /usr/bin/env python #coding=Latin-1 import os import wave my_path = os.getcwd() my_snd_path = my_path + "\\snd" my_snd_file = my_snd_path + '\\en_haut.wav' print my_snd_file wr_en_haut = wave.open(my_snd_file, 'r') wr_en_haut.rewind() nb_of_frames = wr_en_haut.getnframes() wr_en_haut.readframes(nb_of_frames)
Partager