mirror of
https://github.com/migatu/conjurer.git
synced 2026-07-14 21:38:38 +00:00
moving api key to netrc
This commit is contained in:
@@ -1,13 +1,19 @@
|
||||
import logging
|
||||
import wave
|
||||
import asyncio
|
||||
import netrc
|
||||
import assemblyai as aai
|
||||
import discord
|
||||
from discord.ext import commands, voice_recv, tasks
|
||||
from discord.opus import Decoder as OpusDecoder
|
||||
import time
|
||||
|
||||
# Replace with your API key
|
||||
aai.settings.api_key = "aa9962f0088a449a9c4ab2361e96cc08"
|
||||
NETRC_FILE = "/home/pi/.netrc"
|
||||
netrc_mod = netrc.netrc(NETRC_FILE)
|
||||
authTokens = netrc_mod.authenticators("assemblyai")
|
||||
aai.settings.api_key = authTokens[2]
|
||||
|
||||
discord.opus._load_default()
|
||||
CHANNELS = OpusDecoder.CHANNELS
|
||||
SAMPLE_WIDTH = OpusDecoder.SAMPLE_SIZE // OpusDecoder.CHANNELS
|
||||
|
||||
Reference in New Issue
Block a user