Replies: 1 comment 1 reply
-
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, I'm new to this domain but i try to build an AI like Alexa that work fully locally, I tried to use whisper to transcript my audio to text but when I try to start the program I got this error : "UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe8 in position 262: invalid continuation byte" and I don't understand why. I have installed ffmpeg and python-ffmpeg.
Here is the code :
#-- coding: utf-8 --
from re import S
import pyaudio
import wave
import tempfile
import os
import sounddevice as sd
import numpy as np
import scipy.io.wavfile as wav
from AI_discussion import SpeechToText
def enregistrer_audio():
# Paramètres d'enregistrement
CHUNK = 1024
FORMAT = pyaudio.paInt16
CHANNELS = 2
RATE = 44100
RECORD_SECONDS = 5
def jouer_audio(wav_temp):
try:
# Lire le fichier WAV
rate, data = wav.read(wav_temp.name)
Utilisation de la fonction
wav_temp = enregistrer_audio()
result = SpeechToText("tempdir")
result["text"]
and here is the code from Ai_discussion ( I know the are not really accurate...) :
import whisper
class SpeechToText():
If someone could help me it would be great thanks !
(btw please excuse my english)
Beta Was this translation helpful? Give feedback.
All reactions