Record Feature

FM Receiver App – Week 9 Update

This week, I made solid progress on several fronts:

  1. Resolved an import issue in GRC
  2. Added audio recording functionality
  3. Implemented a top menu bar
  4. Debugged the Config Manager

Import Issue Fixed

Previously, GRC-generated Python code failed to correctly import my embedded block due to package-relative import conflicts. The solution was to manually register the module in sys.modules before launching the app:

from flowgraphs import rds_rx_epy_block_0
sys.modules["rds_rx_epy_block_0"] = rds_rx_epy_block_0

from app import FMReceiverApp

This ensures Python knows where to find the block, avoiding import errors.


Audio Recording Functionality

To enable recording, I added a WAV audio sink to the GRC flowgraph, connecting it to both audio channels. In the Python app, I used the following interface to manage audio streams:

bool open(const char* filename) override;
void close() override;

This lets users save recordings to custom locations.


Top Menu Bar

I added a basic top menu that allows users to specify save paths for recordings. More features will be added here in the future.


Debugging & Lessons

I initially thought the WAV files were silent due to a broken sink—but the issue was just missing audio playback software. Installing VLC confirmed the recordings were fine.

Currently, I am having trouble with the config manager. I did not have enough time to tackle this issue yet, but I will work on the during the next week.


Next Steps

  • Improve the frontend UI
  • Clean up and document the code (docstrings, type hints, README, usage examples)
  • Continue development of the Config Manager
  • Add debugging tools:
    • Next/Previous station buttons
    • Volume slider
    • Frequency slider

Useful Links




Enjoy Reading This Article?

Here are some more articles you might like to read next:

  • End of My GSoC journey
  • Documentation and Soapy Sdr source
  • Multiple Recording Feature
  • SDR Device and Code Documenting
  • Cleaning and Formatting