From bd28d92e7d556227d0c07c401dd3015e1f90737d Mon Sep 17 00:00:00 2001 From: insert-usernamehere Date: Sat, 15 Apr 2023 20:10:35 -0400 Subject: [PATCH] remove bing --- transcribebot.py | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/transcribebot.py b/transcribebot.py index bf7ca2a..bdc6264 100644 --- a/transcribebot.py +++ b/transcribebot.py @@ -34,21 +34,12 @@ async def transcribesphinx(inter: disnake.ApplicationCommandInteraction, message try: await inter.response.defer(ephemeral='true') await message.attachments[0].save("audio.ogg") + # WARNING Google is propritary, consider disabling however sphynix is currently not very good so this provides an option await inter.edit_original_message(content=st.recognize_google(prepaudio("audio.ogg"))) os.remove("audio.ogg") os.remove("audio.wav") except Exception as e: await inter.edit_original_message(content=f'an error appears to have occoured please report it to the developer: {e}') -@bot.message_command(name="Transcrible Using Bing") -async def transcribesphinx(inter: disnake.ApplicationCommandInteraction, message: disnake.Message): - try: - await inter.response.defer(ephemeral='true') - await message.attachments[0].save("audio.ogg") - await inter.edit_original_message(content=st.recognize_bing(prepaudio("audio.ogg"))) - os.remove("audio.ogg") - os.remove("audio.wav") - except Exception as e: - await inter.edit_original_message(content=f'an error appears to have occoured please report it to the developer: {e}') bot.run(os.getenv("TOKEN")) \ No newline at end of file