frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

Open in hackernews

11-HarmonyOS5-SpeechKit-TextReader-Case

2•zhousg•4h ago
Case Study of SpeechKit Text Reading Function in HarmonyOS 5.0 Abstract This article introduces how to use @kit.SpeechKit to implement the text reading function in HarmonyOS 5.0. By creating the SpeechKitTextReader component, users can perform text reading operations and monitor changes in the reading status.

import { ReadStateCode, TextReader, TextReaderIcon } from '@kit.SpeechKit'

@Entry @Component struct SpeechKitTextReader { @State readState: ReadStateCode = ReadStateCode.WAITING; list: TextReader.ReadInfo[] = [ { id: '10001', title: { text: 'Northeast China in March', isClickable: false }, author: { text: 'HarmonyOS Developer', isClickable: false }, date: { text: '2025-06-16', isClickable: false }, bodyInfo: 'In March at 45 degrees north latitude, time ties a gentle knot here. The morning mist by the Songhua River wraps fine snow, carving each branch into transparent glass. Ice crystals stack on the branches to form thousand - petaled magnolias. What rustles down when the wind passes through the branches is not snowflakes, but clearly the debris of stars falling into the world.' } ] item = this.list[0]

  async aboutToAppear(): Promise<void> { 
    const readerParam: TextReader.ReaderParam = { 
      isVoiceBrandVisible: true, 
      businessBrandInfo: { 
        panelName: 'XiaoYi Reading' 
      } 
    } 
    await TextReader.init(getContext(this), readerParam); 
    TextReader.on('stateChange', (state) => { 
      if (this.item.id === state.id) { 
        this.readState = state.state; 
      } else { 
        this.readState = ReadStateCode.WAITING; 
      } 
    }) 
  } 

  async reading() { 
    await TextReader.start(this.list, this.item.id) 
  } 

  aboutToDisappear(): void { 
    TextReader.release() 
  } 

  build() { 
    Column({ space: 15 }) { 
      Row() { 
        Blank() 
        TextReaderIcon({ readState: this.readState }) 
          .onClick(() => { 
            this.reading() 
          }) 
      } 
      .width('100%') 

      Text(this.list[0].bodyInfo) 
    } 
    .padding(15) 
    .height('100%') 
    .width('100%') 
  } 
}

Show HN: Promptive – A native macOS utility for system-wide AI actions

https://www.promptiveai.app
1•helro•2m ago•0 comments

Why is there no consistent single signon API flow?

https://mjg59.dreamwidth.org/72688.html
1•ingve•6m ago•0 comments

Project Indigo – the best camera app for smart phones

https://gregbenzphotography.com/photography-reviews/project-indigo-the-best-camera-app-for-smart-phones/
1•walterbell•10m ago•0 comments

Dutch cloud pioneers face the hard limits of digital sovereignty

https://www.computerweekly.com/news/366626105/Dutch-cloud-pioneers-face-the-hard-limits-of-digital-sovereignty
3•Vinnl•15m ago•0 comments

Trusted Medical Abortion Pill

https://www.homeabortionpillsrx.com/buy-mtp-kit-online
1•IrinaWeindorf00•17m ago•0 comments

Leave Some Work for Tomorrow

https://proteinlanguagemodel.com/blog/leave_work
1•ravishar313•18m ago•0 comments

What CSS length unit should you use?

https://whatunit.com/
1•edent•20m ago•0 comments

A simple, smart tool designed to help users protect every photo and video

1•WuMask•21m ago•0 comments

Continuous Patient Monitoring with AI

https://doi.org/10.3389/fimag.2025.1547166
2•lastboson•23m ago•1 comments

Waiting for Vectors in SQL:202y

http://peter.eisentraut.org/blog/2025/06/24/waiting-for-sql-202y-vectors
2•chmaynard•25m ago•0 comments

Show HN: Dprms – A Digital Patient Record System for Underserved Clinics

https://github.com/IndrojitBanik/dprms-showcase
1•Indrojit_Banik•25m ago•0 comments

Show HN: Shadcn Studio – Built Free Shadcn Theme Generator and Shadcn Components

https://shadcnstudio.com/theme-generator
1•mechdev•31m ago•0 comments

Spain to Add Hurdles to BBVA's Sabadell Bid, Vanguardia Says

https://www.bloomberg.com/news/articles/2025-06-24/spain-to-add-hurdles-to-bbva-s-sabadell-bid-vanguardia-says
1•Bluestein•32m ago•0 comments

Field Study: Social Media, AI, Sponsored Ads and Scams

https://www.study-from-here.com/2025/06/field-study-social-media-ai-sponsored.html
3•BhattMayurJ•32m ago•0 comments

AI: Artificial Intelligence or Actual Improv?

1•snappr021•33m ago•0 comments

Beyond the Basics of Logical Replication

https://boringsql.com/posts/logical-replication-beyond-the-basics/
1•radimm•34m ago•0 comments

Trump can pull the plug on the internet, and Europe can't do anything about it

https://www.politico.eu/article/donald-trump-eu-internet-europe-us-trade-war-data-cyber/
5•pera•35m ago•2 comments

Why Do Some Language Models Fake Alignment While Others Don't?

https://arxiv.org/abs/2506.18032
2•todsacerdoti•37m ago•0 comments

Show HN: After struggling with cold email, I made this AI lead tool

https://www.quickgen.ai/
1•iamqhsin•40m ago•3 comments

Google may be forced to make changes to UK online search, says watchdog

https://www.bbc.com/news/articles/cy4ym77rkgeo
2•lifeisstillgood•41m ago•0 comments

Technical Security Specialist

1•Suhasraj•41m ago•0 comments

Show HN: Supafine – Use simple prompts to generate or remix React UI components

https://create.supafine.app
1•harshdoesdev•45m ago•0 comments

Knockout Mouse

https://asteriskmag.com/issues/10/knockout-mouse
1•Smaug123•45m ago•0 comments

Cash for slime: Towns paying for dead slugs

https://yle.fi/a/74-20168879
2•Michelangelo11•46m ago•0 comments

Stealthy backdoor found hiding in SOHO devices running Linux

https://www.helpnetsecurity.com/2025/06/23/lapdogs-shortleash-backdoor-linux-soho-devices/
3•miles•47m ago•1 comments

Non-Internet Email Address

https://en.wikipedia.org/wiki/Non-Internet_email_address
2•Bluestein•47m ago•1 comments

Claude Did the Coding. Your Competitor Did the Closing

https://hovrai.com/blog/claude-did-the-coding
5•skilldeliver•50m ago•0 comments

Firefox 140 Released with "Unload Tab", CSS Custom Highlighting API

https://www.phoronix.com/news/Firefox-140
4•Bogdanp•55m ago•0 comments

Show HN: I made Cursor for Reddit – an AI-powered Chrome extension

https://redkiteai.com/
1•ar0nbg•55m ago•0 comments

Levered beta is all you need

https://textql.notion.site/levered-beta-is-all-you-need-20ba769a508880388186ef0c2fa11389?source=copy_link
3•gagarwal123•56m ago•0 comments