पैकेज, रिपॉज़िटरी और ऐप श्रेणियाँ खोजें

पैकेज विवरणv0.7.2

mic_stream

एक प्लगइन जो डिवाइस के माइक्रोफोन से कच्चे बाइट स्ट्रीम को प्राप्त करता है। ऑडियो को `Stream` के रूप में लौटाया जाता है।

AndroidiOSmacOS
30-दिन डाउनलोड
725
लाइक
99
Pub अंक
130

पैकेज इंस्टॉल करें

flutter pub add mic_stream

पैकेज अवलोकन

सार्वजनिक जानकारी से बना चयन मार्गदर्शन। केवल संदर्भ हेतु।

माइक्रोफ़ोन स्ट्रीम पैकेज डार्ट स्ट्रीम का उपयोग करके डिवाइस के माइक्रोफ़ोन से कच्चे ऑडियो डेटा तक पहुंच की एक सीधी विधि प्रदान करता है। यह एंड्रॉइड, आईओएस और मैकओएस पर रियल-टाइम ऑडियो कैप्चर की अनुमति देता है, जो वॉइस रिकग्निशन, साउंड विजुअलाइजेशन या लाइव ऑडियो विश्लेषण जैसे अनुप्रयोगों के लिए आदर्श है। प्लगइन ऑडियो बाइट्स सीधे प्रदान करता है, जिससे डेवलपर्स को आवश्यकतानुसार कोडिंग, फ़िल्टरिंग या स्थानांतरण का प्रबंधन करने में सक्षम होते हैं। फ्लटर पब एड के माध्यम से न्यूनतम सेटअप के साथ, यह मौजूदा प्रोजेक्ट में बिना किसी दिक्कत के एकीकृत हो जाता है।

उपयोग

  • रियल-टाइम वॉइस प्रोसेसिंग
  • ऑडियो विज़ुअलाइज़ेशन
  • वॉइस कंट्रोल ऐप्स
  • लाइव ऑडियो स्ट्रीमिंग
  • ध्वनि विश्लेषण

मुख्य विशेषताएँ

  • रॉ बाइट स्ट्रीम आउटपुट
  • क्रॉस-प्लेटफ़ॉर्म समर्थन (Android, iOS, macOS)
  • रियल-टाइम ऑडियो कैप्चर
  • सरल स्ट्रीम-आधारित एपीआई
  • हल्का और न्यूनतम निर्भरता

इनके लिए उपयुक्त

  • ऑडियो विश्लेषण टूल बनाने वाले डेवलपर्स
  • कम लेटेंसी माइक्रोफोन इनपुट की आवश्यकता वाले ऐप्स
  • कस्टम ऑडियो प्रोसेसिंग वाले प्रोजेक्ट्स
  • आवाज सक्षम विशेषताओं के प्रोटोटाइपिंग
  • मोबाइल ऑडियो एप्लिकेशन्स

विचार योग्य बातें

  • सभी प्लेटफॉर्म पर माइक्रोफोन की अनुमति की आवश्यकता होती है
  • केवल बाइट डेटा (कोई निर्मित डीकोडिंग नहीं)
  • अतिरिक्त ऑडियो फॉर्मेट हैंडलिंग की आवश्यकता हो सकती है
  • प्रदर्शन उपकरण की क्षमता पर निर्भर करता है
  • कुछ प्लेटफॉर्मों पर पृष्ठभूमि ध्वनि को सीमित किया जा सकता है

मूल README

संबंधित सोर्स रिपॉज़िटरी के मूल README का स्नैपशॉट। नवीनतम सामग्री के लिए रिपॉज़िटरी देखें।

mic_stream: 0.7.2

[Flutter Plugin] Provides a tool to get the microphone input as 8 or 16 bit PCM Stream. 32 bit and floating point PCM are experimental WIP.

About mic_stream:

As Flutter still lacks some functionality, this plugin aims to provide the possibility to easily get an audio stream from the microphone of mobile devices.

How to use:

The plugin mainly provides one method to provide a raw audio stream:

Stream<UInt8List> MicStream.microphone({options})

and a StreamTransformer to provide a Stream of individual samples (not lists of samples):

MicStream.toSampleStream

that you can use to transform your mic stream:

stream.transform(MicStream.toSampleStream)

Listening to this stream starts the audio recorder while cancelling the subscription stops the stream.

Available options are as follows:

audioSource: AudioSource      // The microphone you want to record from
sampleRate: int               // The amount of data points to record per second
channelConfig: ChannelConfig  // Mono or Stereo
audioFormat: AudioFormat      // 8 bit PCM or 16 bit PCM. Other formats are not yet supported

Some configuration options are platform dependent and can differ from the originally configured ones. You can check the real values using:

Future<int> sampleRate = await MicStream.sampleRate;
Future<int> bitDepth = await MicStream.bitDepth;
Future<int> bufferSize = await MicStream.bufferSize;
Permissions

Make sure you have microphone recording permissions enabled for your project. To do so, add this line to the AndroidManifest.xml:

<uses-permission android:name="android.permission.RECORD_AUDIO"/>

In the Info.plist:

<key>NSMicrophoneUsageDescription</key>
<string>Microphone access required</string>

You can disable the permission request dialogue by calling MicStream.shouldRequestPermission(false) This will lead to an error if no permission to record audio has been requested, though.

For MacOS:

Open macos/Runner.xcworkspace click Runner -> Signing & Capabilities -> Check "Audio Input"

Example:
// Init a new Stream
Stream<List<int>> stream = await MicStream.microphone(sampleRate: 44100);

// Start listening to the stream
StreamSubscription<List<int>> listener = stream.listen((samples) => print(samples));
// Transform the stream and print each sample individually
stream.transform(MicStream.toSampleStream).listen(print);
// Cancel the subscription
listener.cancel()

Note: This plugin is still under development, and some APIs might not be available yet. Feedback and Pull Requests are most welcome!

श्रेणियाँ

निर्भरताएँ

निर्भरता सूची 1 आइटम

सोर्स रिपॉज़िटरी

इस पैकेज का उपयोग करने वाले प्रोजेक्ट

अभी कोई डेटा उपलब्ध नहीं है।