jackd를 discord.py로 라우팅

jackd를 discord.py로 라우팅

현재 나는 jackd에서 오디오 출력을 가져와 이를 불일치 음성 채팅에 연결하려고 합니다. 이 솔루션은 작동하지 않는 것 같지만이것솔루션이 작동한다고합니다. 내 솔루션은 작동하지 않지만 다른 솔루션은 작동합니다. 무슨 일이 일어나고 있나요? github 저장소에 있는 것과 유사한 솔루션을 만들 수 있나요?

import discord  
from discord.ext import commands  
from discord.utils import get  
import os
#import jack
from discord.voice_client import VoiceClient


#start ffmpeg encoding magic.
os.system("ffmpeg -f jack -i stream_input -acodec libmp3lame -y stream.mp3 &> ffmpeg.log&")





# start jackd client stuff
#jack_client = jack.Client('Campfire')
#jack_client.inports.register('stream_input')



#Some variables. PLEASE ADJUST."
Client_Prefix= '>'
token= 'Nah'
client = commands.Bot(command_prefix = Client_Prefix)



#discord bot voice stuff 
@client.event
async def on_ready():
    print("Logged in as " + client.user.name + ".\n")
    print("Prefix is " + Client_Prefix + "\n")
    print('Status: armed')
    print('-------------------------------------------------------')

@client.command(pass_context=True)
async def join(ctx):
    await ctx.send('Joining the campfire.')
    global voice
    channel = ctx.message.author.voice.channel
    voice = get(client.voice_clients, guild=ctx.guild)

    if voice and voice.is_connected():
        await voice.move_to(channel)
    else:
        voice = await channel.connect()
        print("The bot has connected to a voice channel.")

@client.command(pass_context=True)
async def leave(ctx):
    channel = ctx.message.author.voice.channel
    voice = get(client.voice_clients, guild=ctx.guild)

    if voice and voice.is_connected():
        await voice.disconnect()
        print("The bot has disconnected from a voice channel")
        await ctx.send("Leaving the campfire")
    else:
        print("Error: I am not currently at a campfire")
        await ctx.send("I am not currently at a campfire.")

@client.command(pass_context=True)
async def stoke(ctx):
    song_there = os.path.isfile("stream.mp3")
    #try:
        #if song_there:
            #os.remove("stream.mp3")
            #print("Removed old campfire ashes.")
            #await ctx.send("Removed old campfire ashes.")
    #except PermissionError:
        #print("Unable to remove old ashes. Bulldozing required.")
        #await ctx.send("Unable to remove old ashes. Bulldozing required.")
        #return

    await ctx.send("Tuning the mystical instrument.")

    voice = get(client.voice_clients, guild=ctx.guild)

    voice.play(discord.FFmpegPCMAudio("stream.mp3"))
client.run(token)

관련 정보