Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to record audio #834

Open
rcnn-retall opened this issue Feb 28, 2025 · 2 comments
Open

Unable to record audio #834

rcnn-retall opened this issue Feb 28, 2025 · 2 comments

Comments

@rcnn-retall
Copy link

Software Versions

  • Python: 3.11.5
  • OS:Android
  • Kivy: 2.3.0
  • Kivy installation method: pip

Describe the bug
A clear and concise description of what the bug is.
Unable to record audio

The issue tracker is a tool to address bugs only (search known bugs: https://git.io/vM1iE).
Please use the #support Discord channel at https://chat.kivy.org/ or Stack Overflow for
support questions, more information at https://git.io/vM1yQ.

Expected behavior
A clear and concise description of what you expected to happen.
app error
To Reproduce
A short, runnable example that reproduces the issue with latest kivy master.

Code and Logs and screenshots

from plyer import audio
from kivy.uix.button import Button
from kivy.uix.screenmanager import Screen, ScreenManager
from kivy.app import App
from kivy.uix.label import Label


class MainApp(App):
    def __init__(self):
        super(MainApp, self).__init__()
        self.body = Screen()
        self.l1 = Label(text="Hello World", pos_hint={"top": 1}, size_hint=(1, None))
        self.l1.bind(texture_size=self.l1.setter("size"))

        self.body.add_widget(self.l1)

        self.body.add_widget(Button(text="strta", size_hint=(.5, .5), pos_hint={"x": 0, "center_y": .5}, on_press=self.start))
        self.body.add_widget(Button(text="end", size_hint=(.5, .5), pos_hint={"right":1,"center_y": .5}, on_press = self.stop))
        self.body.add_widget(Button(text="plyer", size_hint=(1, .25), on_press = self.ple))

    def build(self):
        return self.body
    def start(self, widget):

        try:
            audio.start()
        except Exception as e:
              # 桌面环境不需要权限
            self.l1.text = str(e)
            print(self.l1.text)



    def stop(self, widget):
        try:
            audio.stop()
        except Exception as e:
            self.l1.text = str(e)
    def ple(self, widget):
        try:
            audio.play()
        except Exception as e:
            self.l1.text = str(e)


MainApp().run()

Additional context
Add any other context about the problem here.

Copy link

👋 We use the issue tracker exclusively for bug reports and feature requests. However, this issue appears to be a support request. Please use our support channels to get help with the project.

If you're having trouble installing Kivy, make sure to check out the installation docs for Windows, Linux and macOS.

Let us know if this comment was made in error, and we'll be happy to reopen the issue.

@ElliotGarbus
Copy link

This is a plyer issue and should be posted here: https://github.com/kivy/plyer/issues/
Please post to the plyer forum. Also check out the support forums.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Feb 28, 2025
@akshayaurora akshayaurora transferred this issue from kivy/kivy Mar 11, 2025
@akshayaurora akshayaurora reopened this Mar 11, 2025
@github-actions github-actions bot removed the support label Mar 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants