Recherche avancée

Médias (1)

Mot : - Tags -/biomaping

Autres articles (81)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • Ecrire une actualité

    21 juin 2013, par

    Présentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
    Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
    Vous pouvez personnaliser le formulaire de création d’une actualité.
    Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

Sur d’autres sites (6036)

  • Accessibility Testing : Why It Matters and How to Get Started

    7 mai 2024, par Erin

    Nearly 96% of website homepages had failures with meeting web accessibility criteria in 2024. Aside from not complying with web accessibility laws and regulations, companies are failing a growing number of users with accessibility needs.

    With disabilities, chronic illnesses and ageing populations all rising, brands need to take accessibility more seriously. 

    In this article, we explain why accessibility testing is so important and how you can get started today.

    What is accessibility testing ?

    Accessibility testing optimises digital experiences to make them accessible for users with a range of disabilities and impairments. This includes users with vision impairments, hearing loss, neurodivergence, motor disabilities and cognitive conditions.

    The goal is to create inclusive experiences for everyone by implementing UX principles that address the usability needs of diverse audiences.

    To help developers create accessible experiences, the World Wide Web Consortium (W3C) created the Web Content Accessibility Guidelines (WCAG). The international WCAG standards define the Four Principles of Accessibility :

    • Perceivable : Information and user interface components must be presentable to users in ways they perceive.
    • Operable : User interface components and navigation must be operable.
    • Understandable : Information and the operation of user interfaces must be understandable.
    • Robust : Content must be robust enough to be interpreted reliably by various user agents, including assistive technologies.
    WCAG Four Principles of Accessibility

    The current version of WCAG (2.2) contains 86 success criteria with three grades representing conformance levels :

    • Level A is the minimum conformance rating, indicating that web content is accessible to most users.
    • Level AA is the recommended conformance level to make content accessible to almost everyone, including users with severe disabilities.
    • Level AAA is the highest conformance rating, making content accessible to everyone, regardless of disability.
    WCAG accessibility conformance levels

    Why is accessibility testing important ?

    With record numbers of lawsuits over online accessibility cases, it’s clear that companies underestimate the importance of accessibility testing. Here are seven key reasons you should pay more attention to it :

    1. Create inclusive experiences : Above all, accessibility testing creates inclusive experiences for all users.
    2. Adhere to accessibility regulations : Accessibility laws in most major markets — including the EU web accessibility policy — make it illegal for companies to discriminate against users with disabilities.
    3. Social responsibility : Companies have an ethical responsibility to cater to all users and consumers. 57% say they’re more loyal to brands that commit to addressing social inequities.
    4. Accessibility needs are growing : 16% of the world’s population (1 in 6) experience significant disability and the number will continue to grow as ageing populations rise.
    5. Improve experiences for everyone : Accessibility improves experiences for all users — for example, 80% of UK viewers aged 18-25 (2021) watch content with subtitles enabled.
    6. Maximise marketing reach : Platforms like Google prioritise accessibility yearly, making accessible content and experiences more visible.
    7. Accessibility is profitable : Inclusive companies earn 1.6x more revenue, 2.6x more net income and 2x more profit, according to Accenture (PDF).
    Accenture Accessibility is Profitable

    Who needs inclusive UX ?

    Accessibility testing starts with understanding the usability needs of audiences with disabilities and impairments. Here’s a quick summary of the most common impairments and some of the needs they have in common :

    • Visual impairments : Users may rely on screen readers, magnification software, braille displays, etc. or require certain levels of contrast, text sizes and colour combinations to aid visibility.
    • Hearing impairments : Users may rely on closed captions and subtitles for video content, transcripts for multimedia content and visual alerts/notifications for updates.
    • Motor or mobility impairments : Users might rely on adaptive keyboards, voice recognition and other assistive devices.
    • Cognitive and neurological impairments : Users may rely on technologies like text-to-speech software or require simplified user interfaces, contrast designs, etc., to aid comprehension.
    • Speech impairments : Users may rely on speech recognition and dictation software for any interaction that requires them to speak (e.g., automated customer service machines).

    While accessibility tools can alleviate certain accessibility challenges, inclusive design can remove much of the burden from users. This can involve using plenty of contrast, careful font selection, increasing whitespace and plenty of other design choices.

    Refer to the latest version of the WCAG for further guidance.

    How to run accessibility testing

    Now that we’ve emphasised the importance of accessibility, let’s explain how you can implement your own accessibility testing strategy.

    Create your accessibility testing plan

    Careful planning is crucial for making accessibility testing affordable and profitable. This starts with identifying the assets you need to test and optimise. This may include :

    • Website or web app
    • Mobile app
    • Videos
    • Podcasts and audio
    • PDFs
    • Marketing emails

    Map out all the assets your target audience interacts with and bring them into your accessibility testing plan. Optimising your website for screen readers is great, but you don’t want to forget your marketing emails and exclude vision-impaired users.

    Once you’ve got a complete list of assets, identify the elements and interactions with each one that require accessibility testing. For example, on your website, you should optimise navigation, user interfaces, layouts, web forms, etc.

    You also need to consider the impact of device types. For example, how touchscreens change the experience for motor impairments.

    Now that you know the scope of your testing strategy, it’s time to define your accessibility standards. Use external frameworks like WCAG guidelines and relevant legal requirements to create an internal set of standards.

    Once your accessibility standards are complete, train your staff at every level. This includes designers, developers, and content creators — everyone who works on assets is included in your accessibility testing strategy.

    Implement your accessibility standards throughout the design and development phases. Aim to create the most inclusive experiences possible before the accessibility testing stage.

    Implement accessibility practices at every level

    Treating accessibility as an afterthought is the biggest mistake you can make. Aside from neglecting the importance of accessibility, it’s simply not affordable to create assets and then optimise them for accessibility.

    Instead, you need to implement accessibility standards in every design and development stage. This way, you create inclusive assets from the beginning, and accessibility testing flags minor fixes rather than overhauls.

    By extension, you can take lessons from accessibility tests and update your accessibility standards to improve the quality of future assets.

    Set clear specifications in your accessibility standards for everyone to follow. For example, content publishers should be responsible for adding alt-text to all images. Make designers responsible for following contrast guidelines when optimising elements like CTA buttons.

    A comparison of CTA buttons

    Next, managers can review assets and check for accessibility standards before anything is signed off. This way, you achieve higher test accessibility scores, and most fixes should be minor.

    This is the key to making accessibility testing manageable and profitable.

    Automate accessibility testing

    Automation is the other big factor in making accessibility efficient. With the right tools, you can run tests periodically without any manual workload, collecting data and flagging potential issues at almost no cost.

    For example, you can run automated accessibility tests on your website every month to check for common issues. This might flag up pages without alt-text for images, colour issues on a new batch of landing pages or a sudden drop in mobile loading times.

    Every automated test you can run reduces the manual workload of optimising accessibility. This frees up more time for the manual tests that require the attention of accessibility experts. 

    • Free up time for accessibility tasks that require manual testing
    • Identify issues with new content, assets, code, etc. faster
    • Run automated accessibility testing on new CRO changes

    Schedule manual accessibility reviews

    While it’s important to automate as much accessibility testing as possible, most accessibility standards require some form of manual testing. If we use the WCAG standards as a guideline, more than 70% of success require manual review and verification, including :

    • Testing websites with a screen reader
    • Navigating apps by only using a keyword
    • Quality assessing closed captions and subtitles
    • Testing web forms for people using speech input
    • Checking conversion actions for users with mobility issues (CTAs, forms, payments, etc.)

    Yes, you can automatically check all images for alt-text, but simply providing alt-text isn’t enough. You also have to review alt-text to make sure they’re descriptive, accurate and informative about the experience.

    Once again, the best way to minimise your time spent on manual testing is to implement accessibility standards throughout design and development. Train your content publishers to create alt-text that meets your criteria and editors to review them before pieces are signed off. 

    This way, you should always have the required alt-text before the content reaches the accessibility testing stage. The same applies to video transcriptions, web forms, website navigation, etc.

    Building a culture of accessibility makes the testing process as efficient as possible.

    What tools do you need for accessibility testing ?

    Now that we’ve covered the key essentials of accessibility testing, let’s look at some of the best accessibility testing tools to help you implement your strategy.

    accessiBe : AI-powered accessibility testing automation

    accessiBe is an accessibility testing automation and management system. It incorporates two core products : accessWidget for automating UI accessibility and accessFlow as an all-in-one solution for developers.

    screenshot of accessiBe

    Key features :

    • Automated accessibility testing
    • Accessibility widget for easy optimisation
    • Product accessibility for web, mobile and native apps
    • AI-powered accessibility insights
    • Compliance with WCAG, EAA and more

    As explained earlier, automation is crucial for making accessibility testing efficient and profitable. With accessiBe, you can automate the first line of accessibility checks so testers only need to get involved when manual action is necessary.

    Maze : Intelligent usability testing software

    Maze is a usability testing system that uses AI and automation to enhance traditional qualitative testing. You can run automated tests on live websites, capture survey feedback and recruit users to test experiences with real people.

    screenshot of Maze

    Key features :

    • Live website testing
    • Feedback surveys
    • Usability interviews
    • Test recruitment
    • Automated analysis

    While traditional usability interviews can provide in-depth insights, they’re expensive, time-consuming and difficult to run at scale. Maze’s solution is a hybrid testing system that automates data capture and analysis while supporting real user testing in one system.

    Matomo : Empowering people with ethical web analytics

    Matomo is a web analytics solution that gives you 100% data ownership while respecting user privacy. Think of this as a Google Analytics alternative that doesn’t use your visitors’ data for advertising purposes.

    Matomo dashboard

    Key features :

    • Privacy-friendly and GDPR-compliant tracking
    • Conversion rate optimisation features like heatmaps, session recordings, A/B testing and more
    • Accurate, unsampled data – see 40-60% more data than other analytics tools that sample data
    • Open-source

    Accessibility starts with creating quality experiences for everyone. Matomo reliably captures 100% of the data you need to optimise experiences without losing their trust. Instead of handing their personal info to Google or other tech giants, you retain full data ownership — fully compliant with GDPR, CCPA, etc.

    Try Matomo free for 21-days (no credit card required), or speak to our sales team for more info on how Matomo can enhance your site’s user experience and support your accessibility testing strategy.

    Try Matomo for Free

    Get the web insights you need, without compromising data accuracy.

    No credit card required

    UserTesting : Video-based user testing software

    UserTesting is the more traditional system for running usability tests with real people. The platform helps you recruit users and manage usability tests with a series of sessions and video interviews.

    screenshot of UserTesting

    Key features :

    • Usability testing
    • Test recruitment
    • Live interviews
    • AI-powered insights
    • Usability services

    UserTesting is a slower, more expensive approach to testing experiences, but its video-based interviews allow you to have meaningful conversations with real users.

    Siteimprove : WCAG compliance testing

    Siteimprove automates website testing, accessibility and optimisation. It includes dedicated tools for checking WCAG and DCI compliance with an automated scoring system. This helps you keep track of scores and identify any accessibility and usability issues faster.

    screenshot of Siteimprove screenshot of Siteimprove

    Key features :

    • Automated accessibility checks
    • Inclusivity scores
    • Accessibility recommendations
    • Accessibility tracking
    • Marketing and revenue attribution
    • Usability insights

    Siteimprove provides a first line of accessibility testing with automated checks and practical recommendations. It also tracks accessibility scores, including ratings for all three WCAG compliance levels (A, AA and AAA).

    Find the value in accessibility testing

    Accessibility testing isn’t only a moral obligation ; it’s good business. Aside from avoiding fines and lawsuits, inclusive experiences are increasingly profitable. User bases with accessibility needs are only growing while non-disabled audiences are using accessibility resources like subtitles and transcripts in greater numbers.

    Accessibility improves everyone’s experiences, and this only does good things for conversion rates, revenue and profit.

    Start building your datasets for accessibility testing today with a Matomo 21-day free trial — no credit card required. Gain 100% ownership over your analytics data while complying with GDPR and other data privacy regulations.

  • What Is Ethical SEO & Why Does It Matter ?

    7 mai 2024, par Erin

    Do you want to generate more revenue ?

    Then, you need to ensure you have a steady stream of traffic flowing to your site.

    Search engines like Google, Bing and Yahoo are powerful mediums you can use to scale your business.

    Search engine optimisation (SEO) is the process of creating search engine-friendly content to draw in traffic to your website. But, if you aren’t careful, you could be crossing the line of ethical SEO into unethical SEO.

    In this article, we break down what ethical SEO is, why it’s important in business and how you can implement effective SEO into your business while remaining ethical.

    Let’s begin.

    What is ethical SEO ?

    Since the early days of the internet and search engines, business owners and marketers have tried using all kinds of SEO tactics to rank atop the search engines for relevant keywords.

    The problem ?

    Some of these practices are ethical, while others aren’t.

    What exactly is ethical SEO ?

    It’s the practice of optimising your website’s rankings in search engines by following search engine guidelines and prioritising user experience.

    What is ethical SEO?

    Ethical SEO is also referred to as “white hat SEO.”

    On the other hand, businesses that break search engine rules and guidelines to “hack” their way to the top with faulty and questionable practices use unethical SEO, or “black hat SEO.”

    Ethical SEO aims to achieve higher rankings in search engines through sustainable, legitimate and fair methods.

    Black hat, or unethical SEO, aims to manipulate or “game” the system with deceptive strategies to bypass the search engine’s guidelines to rank higher.

    The two core branches of ethical SEO include :

    1. Strategies that align with search engine guidelines.
    2. Accessibility to broad audiences.

    Some examples of ethical SEO principles include :

    • Natural link building
    • Compliance with search engine guidelines
    • Establishing great user experiences
    • Creating reader-focused content

    By sticking to the right guidelines and implementing proper SEO practices, businesses can establish ethical SEO to generate more traffic and grow their brands.

    8 ethical SEO practices to implement

    If you want to grow your organic search traffic, then there’s no doubt you’ll need to have some SEO knowledge.

    While there are dozens of ways to “game” SEO, it’s best to stick to proven, ethical SEO techniques to improve your rankings.

    Stick to these best practices to increase your rankings in the search engine results pages (SERPs), increase organic traffic and improve your website conversions.

    8 Ethical SEO Practices to Implement

    1. Crafting high-quality content

    The most important piece of any ethical SEO strategy is content.

    Forget about rankings, keywords and links for a second.

    Step back and think about why people go to Google, Bing and Yahoo in the first place.

    They’re there looking for information. They have a question they need answered. That’s where you can come in and give them the answer they want. 

    How ? In the form of content.

    The best long-term ethical SEO strategy is to create the highest-quality content possible. Crafting high-quality content should be where you focus 90% of your SEO efforts.

    2. Following search engine guidelines

    Once you’ve got a solid content creation strategy, where you’re producing in-depth, quality content, you need to ensure you’re following the guidelines and rules put in place by the major search engines.

    This means you need to stay compliant with the best practices and guidelines laid out by the top search engines.

    If you fail to follow these rules, you could be penalised, your content could be downgraded or removed from search engines, and you could even have your entire website flagged, impacting your entire organic search traffic from your site.

    You need to ensure you align with the guidelines so you’re set up for long-term success with your SEO.

    3. Conducting keyword research and optimisation

    Now that we’ve covered content and guidelines, let’s talk about the technical stuff, starting with keywords.

    In the early days of SEO (late 90s), just about anyone could rank a web page high by stuffing keywords all over the page.

    While those black hat techniques used to work to “game” the system, it doesn’t work like that anymore. Google and other major search engines have much more advanced algorithms that can detect keyword stuffing and manipulation.

    Keywords are still a major part of a successful SEO strategy. You can ethically incorporate keywords into your content (and you should) if you want to rank higher. 

    Your main goal with your content is to match it with the search intent. So, incorporating keywords should come naturally throughout your content. If you try to stuff in unnecessary keywords or use spammy techniques, you may not even rank at all and could harm your website’s rankings.

    4. Incorporating natural link building

    After you’ve covered content and keywords, it’s time to dive into links. Backlinks are any links that point back to your website from another website.

    These are a crucial part of the SEO pie. Without them, it’s hard to rank high on Google. They work well because they tell Google your web page or website has authority on a subject matter.

    But you could be penalised if you try to manipulate backlinks by purchasing them or spamming them from other websites.

    Instead, you should aim to draw in natural backlinks by creating content that attracts them.

    How ? There are several options :

    • Content marketing
    • Email outreach
    • Brand mentions
    • Public relations
    • Ethical guest posting

    Get involved in other people’s communities. Get on podcasts. Write guest posts. Connect with other brands. Provide value in your niche and create content worth linking to.

    5. Respecting the intellectual property of other brands

    Content creation is moving at lightspeed in the creator economy and social media era. For better or for worse, content is going viral every day. People share content, place their spin on it, revise it, optimise it, and spread it around the internet.

    Unfortunately, this means the content is sometimes shared without the owner’s permission. Content is one form of intellectual property (IP). 

    If you share copyrighted material, you could face legal consequences.

    6. Ensuring transparency

    Transparency is one of the pillars of ethical marketing.

    If you’re running the SEO in your company or an agency, you should always explain the SEO strategies and tactics you’re implementing to your stakeholders.

    It’s best to lean on transparency and honesty to ensure your team knows you’re running operations ethically.

    7. Implementing a great user experience

    The final pillar of ethical SEO practices is offering a great user experience on your website.

    Major search engines like Google are favouring user experience more and more every year. This means knowing how to track and analyse website metrics like page load times, time on page, pageviews, media plays and event tracking.

    8. Use an ethical web analytics solution

    Last but certainly not least. Tracking your website visitors ethically is key to maintaining SEO ethics.

    You can do this by using an ethical web analytics solution like Matomo, Plausible or Fathom. All three are committed to respecting user privacy and offer ethical tracking of visitors.

    We’re a bit biassed towards Matomo, of course, but for good reasons.

    Matomo offers accurate, unsampled data along with advanced features like heatmaps, session recording, and A/B testing. These features enhance user experience and support ethical SEO practices by providing insights into user behaviour, helping optimise content. 

    Try Matomo for Free

    Get the web insights you need, without compromising data accuracy.

    No credit card required

    6 unethical SEO practices to avoid

    Now that we’ve covered the ethical SEO best practices let’s talk about what kind of unethical SEO practices you want to avoid.

    Remember, SEO isn’t as easy to manipulate as it once was 20 years ago.

    Algorithms are much more sophisticated now, and search engines are getting better at detecting fraudulent, scammy or unethical SEO practices every year.

    Avoid these eight unethical SEO practices to ensure you can rank high in the long term :

    6 unethical SEO practices to avoid.

    1. Keyword stuffing

    Keyword stuffing is probably the most common unethical SEO practice. This is where someone deliberately stuffs keywords onto a page to manipulate the search engines to rank a web page higher.

    Where this is unethical isn’t always easy to detect, but in some cases, it is. It comes down to whether it’s relevant and natural or intentionally stuffing.

    2. Cloaking

    Cloaking is another unethical SEO practice where someone manipulates the information search engines see on their website.

    For example, someone may show search engines one web page on their website, but when someone clicks on it in Google, they can direct someone to a completely different page. They do this by detecting the incoming request from the user agent and presenting different content.

    3. Deceiving functionality

    Another way companies are unethically implementing SEO tactics is by deceiving people with misleading information. For example, a website may claim to provide a free resource or directory but may intentionally lead visitors to paid products.

    4. Fraudulent redirects

    Another way to deceive or mislead searchers is by creating fraudulent redirects. A redirect is a way to take someone to a different web page when they click on another one. Redirects can be useful if a page is broken or outdated. However, they can be used to deceptively take someone to a website they didn’t intend to view.

    5. Negative SEO

    Negative SEO is the intentional attempt to harm a competitor’s search engine rankings through unethical tactics.

    These tactics include duplicating their content or generating spammy links by creating low quality or irrelevant backlinks to their site.

    6. Hidden text

    Placing hidden text on a website typically has one purpose : keyword stuffing.

    Instead of making it visible to users reading the content, websites will place invisible text or text that’s hard to read on a website to try to rank the content higher and manipulate the search engines.

    3 reasons you need to implement ethical SEO

    So, why should you ensure you only implement ethical SEO in your organic traffic strategy ?

    It’s not just about what’s morally right or wrong. Implementing ethical SEO is the smartest long-term marketing strategy :

    1. Better long-term SEO

    Search engine optimisation is about implementing the “right” tactics to get your website to rank higher.

    The funny thing is many people are trying to get quick fixes by manipulating search engines to see results now.

    However, the ones who implement shady tactics and “hacks” to game the system almost always end up losing their rankings in the long term. 

    The best long-term SEO strategy is to do things ethically. Create content that helps people. Make higher quality content than your competitors. If you do those two things right, you’ll have better search traffic for years.

    2. Great brand reputation

    Not only is ethical SEO a great way to get long-term results, but it’s also a good way to maintain a solid brand reputation.

    Reputation management is a crucial aspect of SEO. All it takes is one bad incident, and your SEO could be negatively impacted.

    3. Lower chance of penalties

    If you play by the rules, you have a lower risk of being penalised by Google.

    The reality is that Google owns the search engine, not you. While we can benefit from the traffic generation of major search engines, you could lose all your rankings if you break their guidelines.

    Track SEO data ethically with Matomo

    Ethical SEO is all about :

    • Serving your audience
    • Getting better traffic in the long run

    If you fail to follow ethical SEO practices, you could be de-ranked or have your reputation on the line.

    However, if you implement ethical SEO, you could reap the rewards of a sustainable marketing strategy that helps you grow your traffic correctly and increase conversions in the long term.

    If you’re ready to start implementing ethical SEO, you need to ensure you depend on an ethical web analytics solution like Matomo.

    Unlike other web analytics solutions, Matomo prioritises user privacy, maintains transparent, ethical data collection practices, and does not sell user data to advertisers. Matomo provides 100% data ownership, ensuring that your data remains yours to own and control.

    As the leading privacy-friendly web analytics solution globally, trusted by over 1 million websites, Matomo ensures :

    • Accurate data without data sampling for confident insights and better results
    • Privacy-friendly and GDPR-compliant web analytics
    • Open-source access for transparency and creating a custom solution tailored to your needs

    Try Matomo free for 21-days. No credit card required.

  • ffmpeg failed to load audio file

    14 avril 2024, par Vaishnav Ghenge
    Failed to load audio: ffmpeg version 5.1.4-0+deb12u1 Copyright (c) Failed to load audio: ffmpeg version 5.1.4-0+deb12u1 Copyright (c) 2000-2023 the FFmpeg developers
  built with gcc 12 (Debian 12.2.0-14)
  configuration: --prefix=/usr --extra-version=0+deb12u1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libglslang --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librist --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --disable-sndio --enable-libjxl --enable-pocketsphinx --enable-librsvg --enable-libmfx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-libplacebo --enable-librav1e --enable-shared
  libavutil      57. 28.100 / 57. 28.100
  libavcodec     59. 37.100 / 59. 37.100
  libavformat    59. 27.100 / 59. 27.100
  libavdevice    59.  7.100 / 59.  7.100
  libavfilter     8. 44.100 /  8. 44.100
  libswscale      6.  7.100 /  6.  7.100
  libswresample   4.  7.100 /  4.  7.100
  libpostproc    56.  6.100 / 56.  6.100
/tmp/tmpjlchcpdm.wav: Invalid data found when processing input


    


    backend :

    


    
@app.route("/transcribe", methods=["POST"])
def transcribe():
    # Check if audio file is present in the request
    if 'audio_file' not in request.files:
        return jsonify({"error": "No file part"}), 400
    
    audio_file = request.files.get('audio_file')

    # Check if audio_file is sent in files
    if not audio_file:
        return jsonify({"error": "`audio_file` is missing in request.files"}), 400

    # Check if the file is present
    if audio_file.filename == '':
        return jsonify({"error": "No selected file"}), 400

    # Save the file with a unique name
    filename = secure_filename(audio_file.filename)
    unique_filename = os.path.join("uploads", str(uuid.uuid4()) + '_' + filename)
    # audio_file.save(unique_filename)
    
    # Read the contents of the audio file
    contents = audio_file.read()

    max_file_size = 500 * 1024 * 1024
    if len(contents) > max_file_size:
        return jsonify({"error": "File is too large"}), 400

    # Check if the file extension suggests it's a WAV file
    if not filename.lower().endswith('.wav'):
        # Delete the file if it's not a WAV file
        os.remove(unique_filename)
        return jsonify({"error": "Only WAV files are supported"}), 400

    print(f"\033[92m{filename}\033[0m")

    # Call Celery task asynchronously
    result = transcribe_audio.delay(contents)

    return jsonify({
        "task_id": result.id,
        "status": "pending"
    })


@celery_app.task
def transcribe_audio(contents):
    # Transcribe the audio
    try:
        # Create a temporary file to save the audio data
        with tempfile.NamedTemporaryFile(suffix=".wav", delete=False) as temp_audio:
            temp_path = temp_audio.name
            temp_audio.write(contents)

            print(f"\033[92mFile temporary path: {temp_path}\033[0m")
            transcribe_start_time = time.time()

            # Transcribe the audio
            transcription = transcribe_with_whisper(temp_path)
            
            transcribe_end_time = time.time()
            print(f"\033[92mTranscripted text: {transcription}\033[0m")

            return transcription, transcribe_end_time - transcribe_start_time

    except Exception as e:
        print(f"\033[92mError: {e}\033[0m")
        return str(e)


    


    frontend :

    


        useEffect(() => {
        const init = () => {
            navigator.mediaDevices.getUserMedia({audio: true})
                .then((audioStream) => {
                    const recorder = new MediaRecorder(audioStream);

                    recorder.ondataavailable = e => {
                        if (e.data.size > 0) {
                            setChunks(prevChunks => [...prevChunks, e.data]);
                        }
                    };

                    recorder.onerror = (e) => {
                        console.log("error: ", e);
                    }

                    recorder.onstart = () => {
                        console.log("started");
                    }

                    recorder.start();

                    setStream(audioStream);
                    setRecorder(recorder);
                });
        }

        init();

        return () => {
            if (recorder && recorder.state === 'recording') {
                recorder.stop();
            }

            if (stream) {
                stream.getTracks().forEach(track => track.stop());
            }
        }
    }, []);

    useEffect(() => {
        // Send chunks of audio data to the backend at regular intervals
        const intervalId = setInterval(() => {
            if (recorder && recorder.state === 'recording') {
                recorder.requestData(); // Trigger data available event
            }
        }, 8000); // Adjust the interval as needed


        return () => {
            if (intervalId) {
                console.log("Interval cleared");
                clearInterval(intervalId);
            }
        };
    }, [recorder]);

    useEffect(() => {
        const processAudio = async () => {
            if (chunks.length > 0) {
                // Send the latest chunk to the server for transcription
                const latestChunk = chunks[chunks.length - 1];

                const audioBlob = new Blob([latestChunk]);
                convertBlobToAudioFile(audioBlob);
            }
        };

        void processAudio();
    }, [chunks]);

    const convertBlobToAudioFile = useCallback((blob: Blob) => {
        // Convert Blob to audio file (e.g., WAV)
        // This conversion may require using a third-party library or service
        // For example, you can use the MediaRecorder API to record audio in WAV format directly
        // Alternatively, you can use a library like recorderjs to perform the conversion
        // Here's a simplified example using recorderjs:

        const reader = new FileReader();
        reader.onload = () => {
            const audioBuffer = reader.result; // ArrayBuffer containing audio data

            // Send audioBuffer to Flask server or perform further processing
            sendAudioToFlask(audioBuffer as ArrayBuffer);
        };

        reader.readAsArrayBuffer(blob);
    }, []);

    const sendAudioToFlask = useCallback((audioBuffer: ArrayBuffer) => {
        const formData = new FormData();
        formData.append('audio_file', new Blob([audioBuffer]), `speech_audio.wav`);

        console.log(formData.get("audio_file"));

        fetch('http://34.87.75.138:8000/transcribe', {
            method: 'POST',
            body: formData
        })
            .then(response => response.json())
            .then((data: { task_id: string, status: string }) => {
                pendingTaskIdsRef.current.push(data.task_id);
            })
            .catch(error => {
                console.error('Error sending audio to Flask server:', error);
            });
    }, []);


    


    I was trying to pass the audio from frontend to whisper model which is in flask app