Testing for transcribe

This commit is contained in:
2024-08-28 14:44:54 +02:00
parent 7857226e12
commit c448201823
4 changed files with 67 additions and 4 deletions
+3 -3
View File
@@ -50,7 +50,7 @@ class Transcriber(commands.Cog):
)
for utterance in transcript.utterances:
print(f"Speaker {utterance.speaker}: {utterance.text}")
@commands.hybrid_command(name="test")
@commands.hybrid_command(name="connect_for_transcribe")
async def test(self, ctx):
def callback(user, data: voice_recv.VoiceData):
print(f"Got packet from {user}")
@@ -65,11 +65,11 @@ class Transcriber(commands.Cog):
vc = await ctx.author.voice.channel.connect(cls=voice_recv.VoiceRecvClient)
vc.listen(voice_recv.BasicSink(callback))
@commands.command()
@commands.command(name="stop_transcribe")
async def stop(self, ctx):
await ctx.voice_client.disconnect()
@commands.command()
@commands.command(name="kill_transcribe_client")
async def die(self, ctx):
ctx.voice_client.stop()
await ctx.bot.close()